summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-04-02 15:10:38 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-04-02 22:31:49 +0200
commit05be2a00cefdc7dc9653080fa7df149910d5cd55 (patch)
tree656c6bb5630384187878836c4ff4177a27573aa1
parent6566bdbfe375065bed11d9a459c438cbc405243d (diff)
downloadApp-BorgRestore-05be2a00cefdc7dc9653080fa7df149910d5cd55.tar.gz
App-BorgRestore-05be2a00cefdc7dc9653080fa7df149910d5cd55.tar.xz
Use die in script
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xscript/borg-restore.pl6
1 files changed, 2 insertions, 4 deletions
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);