Skip to content

Commit df84c74

Browse files
simondezielpmcmaw
authored andcommittedAug 15, 2018
(MODULES-6981) Do not try to read ~root/.my.cnf when calling "mysqld -V" (#1063)
* (MODULES-5618) Do not try to read ~root/.my.cnf when calling "mysqld -V"
1 parent a2dbbbe commit df84c74

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

Diff for: ‎lib/facter/mysqld_version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Facter.add('mysqld_version') do
22
setcode do
3-
Facter::Util::Resolution.exec('mysqld -V 2>/dev/null')
3+
Facter::Util::Resolution.exec('mysqld --no-defaults -V 2>/dev/null')
44
end
55
end

Diff for: ‎spec/unit/facter/mysqld_version_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
describe 'mysqld_version' do
99
context 'with value' do
1010
before :each do
11-
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)')
11+
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)')
1212
end
1313
it {
1414
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)')

0 commit comments

Comments
 (0)
Please sign in to comment.