From ba9291ea4294efaa0c893865685e7b19148a48c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20B=C3=A9rtoli?= Date: Wed, 19 Jun 2019 10:03:57 -0300 Subject: [PATCH] ci(travis): change python version test to a way travis likes --- test/integration/default/controls/pips_spec.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/integration/default/controls/pips_spec.rb b/test/integration/default/controls/pips_spec.rb index d1b314e..9c93171 100644 --- a/test/integration/default/controls/pips_spec.rb +++ b/test/integration/default/controls/pips_spec.rb @@ -1,8 +1,9 @@ # On some OSes+py3, /usr/bin/pip3 does not have a /usr/bin/pip link/file # and Inspec fails to correctly find the pip binary. -# As there's no py2/py3 separate tools, this hack let's us overcome the issue - -if(File.exist?('/usr/bin/pip3')) +# We can probably pass the suite's name as an attribute to inspec +# but can't find how to do that so this flaky hack let's us overcome the issue +# Please, please please, feel free to improve it :) +if command('/usr/bin/pip3').exist? pip_binary = '/usr/bin/pip3' else pip_binary = '/usr/bin/pip'