makepkg-template: Remove linenumber/file from errors
die prints "at $scriptname line $linenumber." if the string does not end with "\n". This information is not of much use for us and it makes testing harder because we'd to remove it there. Signed-off-by: Florian Pritz <bluewind@xinu.at>
This commit is contained in:
parent
77ca6e4062
commit
f617b6acd4
1 changed files with 2 additions and 2 deletions
|
@ -109,7 +109,7 @@ sub load_template {
|
||||||
my ($version) = (abs_path($path) =~ /-([0-9.]+)[.]template$/);
|
my ($version) = (abs_path($path) =~ /-([0-9.]+)[.]template$/);
|
||||||
|
|
||||||
if (!$version) {
|
if (!$version) {
|
||||||
die sprintf(gettext("Couldn't detect version for template '%s'"), $values->{name});
|
die sprintf(gettext("Couldn't detect version for template '%s'\n"), $values->{name});
|
||||||
}
|
}
|
||||||
|
|
||||||
my $parsed = process_file($path);
|
my $parsed = process_file($path);
|
||||||
|
@ -128,7 +128,7 @@ sub process_file {
|
||||||
my $nesting_level = 0;
|
my $nesting_level = 0;
|
||||||
my $linenumber = 0;
|
my $linenumber = 0;
|
||||||
|
|
||||||
open (my $fh, "<", $filename) or die sprintf(gettext("failed to open '%s': %s"), $filename, $!);
|
open (my $fh, "<", $filename) or die sprintf(gettext("failed to open '%s': %s\n"), $filename, $!);
|
||||||
my @lines = <$fh>;
|
my @lines = <$fh>;
|
||||||
close $fh;
|
close $fh;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue