From 15a1c611b2fa6c667d015983eaf06a1e842f97d4 Mon Sep 17 00:00:00 2001 From: Shiva Poudel Date: Sat, 21 Nov 2015 18:37:44 +0545 Subject: [PATCH] Update virtualenv_version.rb --- lib/facter/virtualenv_version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/facter/virtualenv_version.rb b/lib/facter/virtualenv_version.rb index a0917d09..8cd10364 100644 --- a/lib/facter/virtualenv_version.rb +++ b/lib/facter/virtualenv_version.rb @@ -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