diff options
author | Florian Pritz <bluewind@xinu.at> | 2017-04-02 15:10:38 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2017-04-02 22:31:49 +0200 |
commit | 05be2a00cefdc7dc9653080fa7df149910d5cd55 (patch) | |
tree | 656c6bb5630384187878836c4ff4177a27573aa1 | |
parent | 6566bdbfe375065bed11d9a459c438cbc405243d (diff) | |
download | App-BorgRestore-05be2a00cefdc7dc9653080fa7df149910d5cd55.tar.gz App-BorgRestore-05be2a00cefdc7dc9653080fa7df149910d5cd55.tar.xz |
Use die in script
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | script/borg-restore.pl | 6 |
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); |