From 1fe9c3ca4a86366913f8c7cb225ff82c5ba03480 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 11 May 2020 01:28:38 +0100 Subject: [PATCH] nailing-cargo: Do not pass --target= to commands which reject it 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 --- nailing-cargo | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nailing-cargo b/nailing-cargo index 529066b..f9d766b 100755 --- a/nailing-cargo +++ b/nailing-cargo @@ -379,8 +379,9 @@ sub calculate () { 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; } -- 2.30.2