From: Simon Ruderich Date: Mon, 1 Feb 2016 08:39:55 +0000 (+0100) Subject: use $screen->die instead of die when loading user config X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=8694357ab0e199a30166bf994a614ea0650a4981;p=fcscs%2Ffcscs.git use $screen->die instead of die when loading user config die does not use Curses to display the error message. Thus keeping the user to wonder what happened when fcscs just quits. --- diff --git a/bin/fcscs b/bin/fcscs index c4a9b05..971cb80 100755 --- a/bin/fcscs +++ b/bin/fcscs @@ -1449,10 +1449,10 @@ package Fcscs { } # Make sure the file is not writable by other users. Doesn't handle # ACLs and see comment above about race conditions. - my @stat = stat $path or die $!; + my @stat = stat $path or $screen->die("Config '$decoded': $!"); my $mode = $stat[2]; if (($mode & Fcntl::S_IWGRP) or ($mode & Fcntl::S_IWOTH)) { - die "Config '$decoded' must not be writable by other users."; + $screen->die("Config '$decoded' must not be writable by other users."); } my $result = do $path;