errorlevel wurde nicht korrekt zurückgemeldet
This commit is contained in:
+14
-2
@@ -7,13 +7,17 @@ echo Output directory: %PROJECT_WORK%
|
|||||||
echo ========================================
|
echo ========================================
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
|
REM Track if any errors occurred
|
||||||
|
set ERRORS_OCCURRED=0
|
||||||
|
|
||||||
REM Iterate through all CSV files in testdata directory
|
REM Iterate through all CSV files in testdata directory
|
||||||
for %%f in (%PROJECT_TEST%\*.csv) do (
|
for %%f in ("%PROJECT_TEST%\*.csv") do (
|
||||||
echo Processing: %%~nxf
|
echo Processing: %%~nxf
|
||||||
CALL plant2dxf.bat -f "%%f" -o "%PROJECT_WORK%\%%~nf.dxf"
|
CALL plant2dxf.bat -f "%%f" -o "%PROJECT_WORK%\%%~nf.dxf"
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
echo ERROR: Failed to process %%~nxf
|
echo ERROR: Failed to process %%~nxf
|
||||||
echo.
|
echo.
|
||||||
|
set ERRORS_OCCURRED=1
|
||||||
) else (
|
) else (
|
||||||
echo SUCCESS: Created %%~nf.dxf in work folder
|
echo SUCCESS: Created %%~nf.dxf in work folder
|
||||||
echo.
|
echo.
|
||||||
@@ -21,6 +25,14 @@ for %%f in (%PROJECT_TEST%\*.csv) do (
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo All test DXF files processed!
|
if %ERRORS_OCCURRED%==1 (
|
||||||
|
echo Processing completed with ERRORS!
|
||||||
echo ========================================
|
echo ========================================
|
||||||
pause
|
pause
|
||||||
|
exit /b 1
|
||||||
|
) else (
|
||||||
|
echo All test DXF files processed successfully!
|
||||||
|
echo ========================================
|
||||||
|
pause
|
||||||
|
exit /b 0
|
||||||
|
)
|
||||||
|
|||||||
+16
-4
@@ -1,6 +1,18 @@
|
|||||||
@echo off
|
@echo off
|
||||||
CALL manage_interpreter.bat activate_interpreter
|
CALL manage_interpreter.bat activate
|
||||||
cd /d %PROJECT%
|
if errorlevel 1 (
|
||||||
|
echo ERROR: Failed to activate Python environment
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
cd /d "%PROJECT%"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo ERROR: Failed to change to project directory: %PROJECT%
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
"%VIRTUAL_ENV%\Scripts\python.exe" -m lib.plant2dxf %*
|
"%VIRTUAL_ENV%\Scripts\python.exe" -m lib.plant2dxf %*
|
||||||
CALL manage_interpreter.bat deactivate_interpreter
|
set PYTHON_EXIT=%ERRORLEVEL%
|
||||||
exit /b %ERRORLEVEL%
|
|
||||||
|
CALL manage_interpreter.bat deactivate
|
||||||
|
exit /b %PYTHON_EXIT%
|
||||||
|
|||||||
Reference in New Issue
Block a user