That's my fault, it was in the first incorrect version of scrub_option() I proposed, but then fixed in a later version.
The difference is that when one of the options to be scrubbed is at the end of the command line, there will be no space after it, so no substitution would occur with the current code then.
The following lines:
$tmp =~ s/--password=[^ ]+ /--password=... /g;
$tmp =~ s/--encrypt-key=[^ ]+ /--encrypt-key=... /g;
Should not contain spaces, i.e.:
$tmp =~ s/--password=[^ ]+/--password= .../g; key=... /g;
$tmp =~ s/--encrypt-key=[^ ]+/--encrypt-
That's my fault, it was in the first incorrect version of scrub_option() I proposed, but then fixed in a later version.
The difference is that when one of the options to be scrubbed is at the end of the command line, there will be no space after it, so no substitution would occur with the current code then.