From 5a45f024779b8a39d277bc61e8cdec856a6f2b15 Mon Sep 17 00:00:00 2001 From: Michael Baker Date: Wed, 22 Jul 2020 07:30:51 +0800 Subject: [PATCH] Remove non pritinable characters --- lib/puppet/provider/mysql.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/puppet/provider/mysql.rb b/lib/puppet/provider/mysql.rb index 389213d68..6e1caf2cd 100644 --- a/lib/puppet/provider/mysql.rb +++ b/lib/puppet/provider/mysql.rb @@ -101,16 +101,16 @@ def self.mysql_caller(text_of_sql, type) if type.eql? 'system' if File.file?("#{Facter.value(:root_home)}/.mylogin.cnf") ENV['MYSQL_TEST_LOGIN_FILE'] = "#{Facter.value(:root_home)}/.mylogin.cnf" - mysql_raw([system_database, '-e', text_of_sql].flatten.compact) + mysql_raw([system_database, '-e', text_of_sql].flatten.compact).scrub else - mysql_raw([defaults_file, system_database, '-e', text_of_sql].flatten.compact) + mysql_raw([defaults_file, system_database, '-e', text_of_sql].flatten.compact).scrub end elsif type.eql? 'regular' if File.file?("#{Facter.value(:root_home)}/.mylogin.cnf") ENV['MYSQL_TEST_LOGIN_FILE'] = "#{Facter.value(:root_home)}/.mylogin.cnf" - mysql_raw(['-NBe', text_of_sql].flatten.compact) + mysql_raw(['-NBe', text_of_sql].flatten.compact).scrub else - mysql_raw([defaults_file, '-NBe', text_of_sql].flatten.compact) + mysql_raw([defaults_file, '-NBe', text_of_sql].flatten.compact).scrub end else raise Puppet::Error, _("#mysql_caller: Unrecognised type '%{type}'" % { type: type })