summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rwxr-xr-xscript/borg-restore.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/borg-restore.pl b/script/borg-restore.pl
index 1365e2e..48744e4 100755
--- a/script/borg-restore.pl
+++ b/script/borg-restore.pl
@@ -199,7 +199,7 @@ sub user_select_archive {
return ${$archives}[$selection];
}
-sub main {
+sub logger_setup {
my $appender = "Screen";
$appender = "ScreenColoredLevels" if -t STDERR; ## no critic (InputOutput::ProhibitInteractiveTest)
@@ -230,6 +230,10 @@ sub main {
Log::Log4perl->get_logger()->fatal(@_);
exit(2);
};
+}
+
+sub main {
+ logger_setup();
my %opts;
# untaint PATH because we only expect this to run as root