mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-27 16:12:04 +00:00
many scripts failed when reading no-version-check from global config file - 1361293
This commit is contained in:
@@ -1132,6 +1132,16 @@ sub _read_config_file {
|
||||
$parse = 0;
|
||||
next LINE;
|
||||
}
|
||||
|
||||
# Silently ignore option [no]-version-check if it is unsupported and it comes from a config file
|
||||
# TODO: Ideally , this should be generalized for all unsupported options that come from global files
|
||||
if ( $parse
|
||||
&& !$self->has('version-check')
|
||||
&& $line =~ /version-check/
|
||||
) {
|
||||
next LINE;
|
||||
}
|
||||
|
||||
if ( $parse
|
||||
&& (my($opt, $arg) = $line =~ m/^\s*([^=\s]+?)(?:\s*=\s*(.*?)\s*)?$/)
|
||||
) {
|
||||
|
@@ -347,6 +347,9 @@ _parse_config_files() {
|
||||
# Skip blank lines.
|
||||
[ "$config_opt" = "" ] && continue
|
||||
|
||||
# Skip global option [no]version-check which don't apply
|
||||
echo "$config_opt" | grep -v 'version-check' >/dev/null 2>&1 || continue
|
||||
|
||||
# Options in a config file are not prefixed with --,
|
||||
# but command line options are, so one or the other has
|
||||
# to add or remove the -- prefix. We add it for config
|
||||
|
Reference in New Issue
Block a user