From 929e73c92b6a17bb5abdd8af3de53e0090929e12 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 25 Jul 2020 11:42:54 +0100 Subject: [PATCH] nailing-cargo: Print $why in error messages Signed-off-by: Ian Jackson --- nailing-cargo | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nailing-cargo b/nailing-cargo index 87dd033..db1d49b 100755 --- a/nailing-cargo +++ b/nailing-cargo @@ -296,15 +296,16 @@ sub read_manifest ($$) { print STDERR "$self: reading $manifest...\n" if $verbose>=4; if (defined $manifests{$manifest}) { print STDERR - "$self: warning: $subdir: specified more than once!\n"; + "$self: warning: $subdir: specified more than once!". + " (ignoring $why)\n"; return undef; } foreach my $try ("$manifest.unnailed", "$manifest") { - my $toml = toml_or_enoent($try, "package manifest") // next; + my $toml = toml_or_enoent($try, "manifest, in $why") // next; my $p = $toml->{package}{name}; if (!defined $p) { print STDERR - "$self: warning: $subdir: missing package.name in $try, ignoring\n"; + "$self: warning: $subdir, $why: missing package.name in $try, ignoring\n"; next; } $manifests{$manifest} = $toml; -- 2.30.2