These are just the commands I know right now to reject it. This list
may well need to be expanded.
It may later become necessary to have two ifs, if the set of
Cargo.lock updating commands, and the set of --target= rejecting ones,
are not the same.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
sub addargs () {
if (@ARGV>=2 &&
$ARGV[0] =~ m{\bcargo\b} &&
- $ARGV[1] =~ m/generate-lockfile|update/) {
+ $ARGV[1] =~ m/^(?:generate-lockfile|update)$/) {
$cargo_lock_update //= 1;
+ $target = undef;
} else {
$cargo_lock_update //= 0;
}