Skip to content

Commit

Permalink
ci(travis): change python version test to a way travis likes
Browse files Browse the repository at this point in the history
  • Loading branch information
javierbertoli committed Jun 19, 2019
1 parent d82ba73 commit ba9291e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/integration/default/controls/pips_spec.rb
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit ba9291e

Please sign in to comment.