From dbfbc36d66d06394a22dd5985db2672164c8a4a2 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 17 Jun 2020 22:54:04 +0100 Subject: [PATCH] nailing-cargo: Automatically set -T for fetch Signed-off-by: Ian Jackson --- nailing-cargo | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 //= -- 2.30.2