From 45362f040db1842d5605de497dcaa7b6f9eae697 Mon Sep 17 00:00:00 2001 From: Adam K Date: Tue, 16 Jan 2024 19:18:30 +0000 Subject: [PATCH] Tweaked exit and error behavior Fixes #43 --- batch encoder.bat | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/batch encoder.bat b/batch encoder.bat index 8003d87..b09b663 100644 --- a/batch encoder.bat +++ b/batch encoder.bat @@ -1,7 +1,7 @@ @echo off setlocal enabledelayedexpansion -set CurrentVersion=v1.7.1 +set CurrentVersion=v1.7.2 cls set "icongray=" @@ -399,8 +399,7 @@ if defined par_updated-from ( "%LOCATION%" %quietargs% -i "%CD%\!INPUTFILE!" -map 0 %quality_arg% %speed_arg% "%CD%\!OUTPUTFILE!" - echo. - echo. + echo. & echo. echo Performing file checks: echo *********************** echo. @@ -445,7 +444,7 @@ if %TOTAL% equ 0 (echo  No files found. %formatend%) :EndPause call:GrayPause - (goto) 2>nul || exit /b 0 + exit /b 0 :CritError timeout /t 1 > nul @@ -455,8 +454,8 @@ if %TOTAL% equ 0 (echo  No files found. %formatend%) echo A critical error occurred. The latest file has not been modified. set errmsg=%~1 if defined errmsg (echo Error message provided: %errmsg%) - if /i "%par_silent%"=="true" (exit /b 3) - goto EndPause + call:GrayPause + (goto) 2>nul || exit /b 3 :AutoUpdateError del "%updateFileName%"