From: Steve Hancock Date: Thu, 25 Apr 2024 23:24:38 +0000 (-0700) Subject: exit immediately if --profile=file cannot be opened X-Git-Tag: 20240511~17 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a791a2dcb49f83d80e19b4c5d6094358e4a1e53a;p=perltidy.git exit immediately if --profile=file cannot be opened --- diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index a86a6982..8854f397 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -4486,7 +4486,7 @@ sub _process_command_line { } } if ( !-e $config_file ) { - Warn( + Die( "cannot find file given with -pro=$config_file: $OS_ERROR\n" ); $config_file = EMPTY_STRING; @@ -4568,8 +4568,9 @@ EOM if ($config_file) { $rconfig_string = stream_slurp($config_file); if ( !defined($rconfig_string) ) { - ${$rconfig_file_chatter} .= - "# $config_file exists but cannot be opened\n"; + Die( +"exiting because profile '$config_file' could not be opened\n" + ); } }