mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-23 21:05:00 +00:00
eval replace_special_vars().
This commit is contained in:
11
bin/pt-agent
11
bin/pt-agent
@@ -7195,9 +7195,12 @@ sub replace_special_vars {
|
||||
# Optional args
|
||||
my $env = $args{env} || '';
|
||||
|
||||
my $new_cmd = join(' ',
|
||||
my $word;
|
||||
my $new_cmd;
|
||||
eval {
|
||||
$new_cmd = join(' ',
|
||||
map {
|
||||
my $word = $_;
|
||||
$word = $_;
|
||||
if ( my ($runno) = $word =~ m/__RUN_(\d+)_OUTPUT__/ ) {
|
||||
if ( $output_files->[$runno] ) {
|
||||
$word = $output_files->[$runno];
|
||||
@@ -7224,6 +7227,10 @@ sub replace_special_vars {
|
||||
}
|
||||
split(/\s+/, $cmd)
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
$logger->fatal("Error replacing " . ($word || '') . " in $cmd: $EVAL_ERROR");
|
||||
}
|
||||
|
||||
return $new_cmd;
|
||||
}
|
||||
|
Reference in New Issue
Block a user