From: Ian Jackson Date: Sat, 25 Jul 2020 10:42:54 +0000 (+0100) Subject: nailing-cargo: Print $why in error messages X-Git-Tag: nailing-cargo/1.0.0~87 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=929e73c92b6a17bb5abdd8af3de53e0090929e12;p=nailing-cargo.git nailing-cargo: Print $why in error messages Signed-off-by: Ian Jackson --- 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;