Given that ssh -V prints the info we want on stderr, made it so we are 100% sure we are only parsing the expected string

This commit is contained in:
Micah Anderson 2015-03-27 15:24:02 -04:00
parent d78749fd8f
commit 52fd60c9f6

View file

@ -1,5 +1,5 @@
Facter.add("ssh_version") do
setcode do
ssh_version = Facter::Util::Resolution.exec('ssh -V 2>&1').chomp.split(' ')[0].split('_')[1]
ssh_version = Facter::Util::Resolution.exec('ssh -V 2>&1 1>/dev/null').chomp.split(' ')[0].split('_')[1]
end
end