exit immediately if --profile=file cannot be opened
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 25 Apr 2024 23:24:38 +0000 (16:24 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 25 Apr 2024 23:24:38 +0000 (16:24 -0700)
lib/Perl/Tidy.pm

index a86a6982404489baa3e7273906ba304748e97aa0..8854f3971c318bc7358c17191b3e96fcc739d3ac 100644 (file)
@@ -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"
+                );
             }
         }