Skip to content

Commit

Permalink
Quit GAP with non-zero exit code if processing init files fails
Browse files Browse the repository at this point in the history
  • Loading branch information
zickgraf committed Oct 31, 2022
1 parent 45161ef commit e6f4a7a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/init.g
Original file line number Diff line number Diff line change
Expand Up @@ -965,17 +965,14 @@ BindGlobal( "ProcessInitFiles", function(initFiles)
PRINT_TO( "*errout*", "Reading file \"", f,
"\" has been aborted.\n");
fi;
if i < Length (initFiles) then
PRINT_TO( "*errout*",
"The remaining files or commands on the command line will not be read.\n" );
fi;
break;
QuitGap( 1 );
elif status = false then
if IsRecord(f) then
PRINT_TO( "*errout*", "Could not execute command \"", f.command, "\".\n" );
else
PRINT_TO( "*errout*", "Could not read file \"", f, "\".\n" );
fi;
QuitGap( 1 );
fi;
od;
end );
Expand Down

0 comments on commit e6f4a7a

Please sign in to comment.