Skip to content

Commit f8c68e8

Browse files
Brian FeketeBrian Fekete
authored andcommitted
Confine fact for only when mysql is in PATH
1 parent 178327a commit f8c68e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/facter/mysql_version.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Facter.add('mysql_version') do
2+
confine { Facter::Core::Execution.which('mysql') }
23
setcode do
34
mysql_ver = Facter::Util::Resolution.exec('mysql --version')
45
mysql_ver.match(%r{\d+\.\d+\.\d+})[0] if mysql_ver

0 commit comments

Comments
 (0)