Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F11012686
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
749 B
Subscribers
None
View Options
diff --git a/lib/facter/sudoversion.rb b/lib/facter/sudoversion.rb
index cf80bdf..6ec9eac 100644
--- a/lib/facter/sudoversion.rb
+++ b/lib/facter/sudoversion.rb
@@ -1,13 +1,16 @@
require 'puppet'
Facter.add(:sudoversion) do
+ confine :os do |os|
+ os['family'] != 'windows'
+ end
setcode do
if Facter::Util::Resolution.which('sudo')
sudoversion = Facter::Util::Resolution.exec('sudo -V 2>&1')
%r{^Sudo version ([\w\.]+)}.match(sudoversion)[1]
elsif Facter::Util::Resolution.which('rpm')
Facter::Util::Resolution.exec('rpm -q sudo --qf \'%{VERSION}\'')
elsif Facter::Util::Resolution.which('dpkg-query')
Facter::Util::Resolution.exec('dpkg-query -W -f=\'${Version}\n\' sudo')
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Sep 18, 4:28 AM (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3312736
Attached To
rSPSUDO puppet-saz-sudo
Event Timeline
Log In to Comment