mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-04 19:37:49 +00:00
PT-115 Updated OptionParser in all scripts
This commit is contained in:
10
bin/pt-find
10
bin/pt-find
@@ -1170,7 +1170,15 @@ sub _validate_type {
|
||||
}
|
||||
}
|
||||
my $defaults = $self->{DSNParser}->parse_options($self);
|
||||
$opt->{value} = $self->{DSNParser}->parse($val, $prev, $defaults);
|
||||
if (!$opt->{attributes}->{repeatable}) {
|
||||
$opt->{value} = $self->{DSNParser}->parse($val, $prev, $defaults);
|
||||
} else {
|
||||
my $values = [];
|
||||
for my $dsn_string (@$val) {
|
||||
push @$values, $self->{DSNParser}->parse($dsn_string, $prev, $defaults);
|
||||
}
|
||||
$opt->{value} = $values;
|
||||
}
|
||||
}
|
||||
elsif ( $val && $opt->{type} eq 'z' ) { # type size
|
||||
PTDEBUG && _d('Parsing option', $opt->{long}, 'as a size value');
|
||||
|
Reference in New Issue
Block a user