Skip to content

Commit

Permalink
(MODULES-6981) Do not try to read ~root/.my.cnf when calling "mysqld …
Browse files Browse the repository at this point in the history
…-V" (#1063)

* (MODULES-5618) Do not try to read ~root/.my.cnf when calling "mysqld -V"
  • Loading branch information
simondeziel authored and pmcmaw committed Aug 15, 2018
1 parent a2dbbbe commit df84c74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/facter/mysqld_version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Facter.add('mysqld_version') do
setcode do
Facter::Util::Resolution.exec('mysqld -V 2>/dev/null')
Facter::Util::Resolution.exec('mysqld --no-defaults -V 2>/dev/null')
end
end
2 changes: 1 addition & 1 deletion spec/unit/facter/mysqld_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
describe 'mysqld_version' do
context 'with value' do
before :each do
Facter::Util::Resolution.stubs(:exec).with('mysqld -V 2>/dev/null').returns('mysqld Ver 5.5.49-37.9 for Linux on x86_64 (Percona Server (GPL), Release 37.9, Revision efa0073)')
Facter::Util::Resolution.stubs(:exec).with('mysqld --no-defaults -V 2>/dev/null').returns('mysqld Ver 5.5.49-37.9 for Linux on x86_64 (Percona Server (GPL), Release 37.9, Revision efa0073)')
end
it {
expect(Facter.fact(:mysqld_version).value).to eq('mysqld Ver 5.5.49-37.9 for Linux on x86_64 (Percona Server (GPL), Release 37.9, Revision efa0073)')
Expand Down

0 comments on commit df84c74

Please sign in to comment.