Skip to content

Commit f29edbd

Browse files
committed
Fix facts for python rc version
1 parent e87db52 commit f29edbd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/facter/python_release.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
def get_python_release(executable)
44
if Facter::Util::Resolution.which(executable) # rubocop:disable Style/GuardClause
5-
results = Facter::Util::Resolution.exec("#{executable} -V 2>&1").match(%r{^.*(\d+\.\d+)\.\d+\+?$})
5+
results = Facter::Util::Resolution.exec("#{executable} -V 2>&1").match(%r{^.*(\d+\.\d+)\.\d+\+?(?:rc\d+)?$})
66
results[1] if results
77
end
88
end

lib/facter/python_version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
def get_python_version(executable)
44
if Facter::Util::Resolution.which(executable) # rubocop:disable Style/GuardClause
5-
results = Facter::Util::Resolution.exec("#{executable} -V 2>&1").match(%r{^.*(\d+\.\d+\.\d+\+?)$})
5+
results = Facter::Util::Resolution.exec("#{executable} -V 2>&1").match(%r{^.*(\d+\.\d+\.\d+\+?(?:rc\d+)?)$})
66
results[1] if results
77
end
88
end

0 commit comments

Comments
 (0)