From a791a2dcb49f83d80e19b4c5d6094358e4a1e53a Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 25 Apr 2024 16:24:38 -0700 Subject: [PATCH] exit immediately if --profile=file cannot be opened --- lib/Perl/Tidy.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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" + ); } } -- 2.39.5