Skip to content

Commit

Permalink
Update virtualenv_version.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Shiva Poudel committed Nov 21, 2015
1 parent fa32eb7 commit 15a1c61
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 15a1c61

Please sign in to comment.