From 19a2ec044a338d193193cd59b7419fc90bdb82c8 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Sun, 19 Mar 2023 09:02:43 +0100 Subject: [PATCH] fix undefined variable in error message --- mmdebstrap | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mmdebstrap b/mmdebstrap index 6c9f6ac..005ccac 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -4445,10 +4445,8 @@ sub main() { my ($opt_name, $opt_value) = @_; my $sanitize_path = sub { my $pkg = shift; - $pkg = abs_path($pkg); - if (!defined $pkg) { - error "cannot resolve absolute path of $pkg: $!"; - } + $pkg = abs_path($pkg) + // error "cannot resolve absolute path of $pkg: $!"; if ($pkg !~ /^\//) { error "absolute path of $pkg doesn't start with a slash"; }