If run normally by double-clicking the .bat file, the program runs and then exits the window normally both in the case of standard successful operation and in case of critical error.
If the command batch encoder.bat --help is run from inside a terminal however, the way the program exits ensures that once the user presses Enter after viewing the help information, the terminal the command was called from will exit/close, which is non-ideal behavior.
Expected behavior
[x] When the program is run via double-click, the program should close the window normally after both successful operation and error.
and
[x] When the program is run via terminal, particularly in the case of --help, the program should exit and return to terminal, with an error code of 0/none.
Potential Cause
Because of Line 448 (2-level exit to deal with being called from inside a subroutine).
Bug Description
If run normally by double-clicking the
.bat
file, the program runs and then exits the window normally both in the case of standard successful operation and in case of critical error.If the command
batch encoder.bat --help
is run from inside a terminal however, the way the program exits ensures that once the user presses Enter after viewing the help information, the terminal the command was called from will exit/close, which is non-ideal behavior.Expected behavior
and
--help
, the program should exit and return to terminal, with an error code of0
/none.Potential Cause
Because of Line 448 (2-level exit to deal with being called from inside a subroutine).
https://github.com/Adam-Kay/Batch-Encoder/blob/af3eb7eb0f086ee4581517d590c729e7a0f9cbbf/batch%20encoder.bat#L448