From 05be2a00cefdc7dc9653080fa7df149910d5cd55 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 2 Apr 2017 15:10:38 +0200 Subject: Use die in script Signed-off-by: Florian Pritz --- script/borg-restore.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'script') diff --git a/script/borg-restore.pl b/script/borg-restore.pl index e79b174..1f66fbd 100755 --- a/script/borg-restore.pl +++ b/script/borg-restore.pl @@ -274,8 +274,7 @@ sub main { } if (@ARGV > 1) { - $log->fatal("Too many arguments"); - exit(1); + die "Too many arguments"; } my $abs_path = $app->resolve_relative_path($path); @@ -295,8 +294,7 @@ sub main { } if (!defined($selected_archive)) { - $log->fatal("No archive selected or selection invalid"); - return 1; + die "No archive selected or selection invalid"; } $app->restore($backup_path, $selected_archive, $destination); -- cgit v1.2.3-24-g4f1b