Skip to content

Commit

Permalink
Merge pull request #265 from stankevich/shivapoudel-patch-1
Browse files Browse the repository at this point in the history
Update virtualenv_version.rb
  • Loading branch information
Shiva Poudel committed Nov 21, 2015
2 parents fa32eb7 + 15a1c61 commit 503dc46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/facter/virtualenv_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Facter.add("virtualenv_version") do
setcode do
if Facter::Util::Resolution.which('virtualenv')
Facter::Util::Resolution.exec('virtualenv --version 2>&1').match(/^(\d+\.\d+\.?\d*).*$/)[0]
Facter::Util::Resolution.exec('virtualenv --version 2>/dev/null || echo 0.0.0').match(/^(\d+\.\d+\.?\d*).*$/)[0]
end
end
end

0 comments on commit 503dc46

Please sign in to comment.