Skip to content

Commit fae8ae4

Browse files
author
Jarl Stefansson
committed
Silence facter by redirecting python -V stderr
1 parent e6b4b94 commit fae8ae4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/facter/python_version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Facter.add("python_version") do
1515
has_weight 100
1616
setcode do
17-
/^.*(\d+\.\d+\.\d+)$/.match(Facter::Util::Resolution.exec('python -V'))[1]
17+
/^.*(\d+\.\d+\.\d+)$/.match(Facter::Util::Resolution.exec('python -V 2>/dev/null'))[1]
1818
end
1919
end
2020

0 commit comments

Comments
 (0)