Adam-Kay / Batch-Encoder

Command line batch file encoder using FFmpeg
GNU General Public License v3.0
0 stars 0 forks source link

Inconsistent exit behavior #43

Closed Adam-Kay closed 10 months ago

Adam-Kay commented 10 months ago

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

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