From: Ian Jackson Date: Mon, 11 May 2020 00:28:38 +0000 (+0100) Subject: nailing-cargo: Do not pass --target= to commands which reject it X-Git-Tag: nailing-cargo/1.0.0~192 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1fe9c3ca4a86366913f8c7cb225ff82c5ba03480;p=nailing-cargo.git 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 --- 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; }