mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-02 02:34:19 +00:00
Changed optionparser to allow for default: no to be false and run update-modules #PT-2457
This commit is contained in:

committed by
Marek Knappe

parent
d0d046122b
commit
6c9ed6ed5b
@@ -839,7 +839,9 @@ sub _parse_specs {
|
||||
$opt->{spec} =~ s/=./=s/ if ( $type && $type =~ m/[HhAadzm]/ );
|
||||
|
||||
if ( (my ($def) = $opt->{desc} =~ m/default\b(?: ([^)]+))?/) ) {
|
||||
$self->{defaults}->{$long} = defined $def ? $def : 1;
|
||||
$def = defined $def ? $def : 1;
|
||||
$def = $def eq 'yes' ? 1 : $def eq 'no' ? 0 : $def;
|
||||
$self->{defaults}->{$long} = $def;
|
||||
PTDEBUG && _d($long, 'default:', $def);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user