From: Ian Jackson Date: Wed, 17 Jun 2020 21:54:04 +0000 (+0100) Subject: nailing-cargo: Automatically set -T for fetch X-Git-Tag: nailing-cargo/1.0.0~184 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=dbfbc36d66d06394a22dd5985db2672164c8a4a2;p=nailing-cargo.git nailing-cargo: Automatically set -T for fetch Signed-off-by: Ian Jackson --- diff --git a/nailing-cargo b/nailing-cargo index d14f194..bb55540 100755 --- a/nailing-cargo +++ b/nailing-cargo @@ -75,8 +75,9 @@ # # -T | --no-cargo-target-arg # -t | --cargo-target-arg -# Suppress --target (or un-suppress it). -# Only useful with -m. +# Suppress --target (or un-suppress it). Only useful with -m. +# Done automatically when nailing-cargo sees that the cargo +# subcommand is one which needs it, eg `fetch'. # # Cargo.nail: # @@ -505,6 +506,9 @@ sub addargs () { $cargo_lock_update //= 1; $target = undef; } + if ($ARGV[1] =~ m/^(?:fetch)$/) { + $cargo_target_arg=0; + } } $cargo_lock_update //= 0; $cargo_manifest_args //=