fix: Batch script syntax error in build-client.bat
- Replace nested if statements with goto for target validation - Remove parentheses from echo statements that conflict with if blocks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -402,16 +402,17 @@ echo %BLUE%[STEP]%NC% 打包 Electron 應用...
|
|||||||
cd /d "%CLIENT_DIR%"
|
cd /d "%CLIENT_DIR%"
|
||||||
|
|
||||||
REM 驗證 BUILD_TARGET
|
REM 驗證 BUILD_TARGET
|
||||||
if /i not "%BUILD_TARGET%"=="nsis" if /i not "%BUILD_TARGET%"=="portable" (
|
if /i "%BUILD_TARGET%"=="nsis" goto :valid_target
|
||||||
echo %RED%[ERROR]%NC% 無效的打包目標: %BUILD_TARGET%
|
if /i "%BUILD_TARGET%"=="portable" goto :valid_target
|
||||||
echo %BLUE%[INFO]%NC% 有效選項: nsis, portable
|
echo %RED%[ERROR]%NC% 無效的打包目標: %BUILD_TARGET%
|
||||||
exit /b 1
|
echo %BLUE%[INFO]%NC% 有效選項: nsis, portable
|
||||||
)
|
exit /b 1
|
||||||
|
|
||||||
|
:valid_target
|
||||||
if /i "%BUILD_TARGET%"=="nsis" (
|
if /i "%BUILD_TARGET%"=="nsis" (
|
||||||
echo %BLUE%[INFO]%NC% 目標平台: Windows (NSIS 安裝檔) - 推薦
|
echo %BLUE%[INFO]%NC% 目標平台: Windows NSIS 安裝檔 - 推薦
|
||||||
) else (
|
) else (
|
||||||
echo %BLUE%[INFO]%NC% 目標平台: Windows (Portable)
|
echo %BLUE%[INFO]%NC% 目標平台: Windows Portable
|
||||||
echo %YELLOW%[WARN]%NC% 注意: Portable 模式的臨時資料夾會在關閉時清空
|
echo %YELLOW%[WARN]%NC% 注意: Portable 模式的臨時資料夾會在關閉時清空
|
||||||
echo %YELLOW%[WARN]%NC% SQLite 資料庫已自動儲存到 %%APPDATA%%\Meeting-Assistant
|
echo %YELLOW%[WARN]%NC% SQLite 資料庫已自動儲存到 %%APPDATA%%\Meeting-Assistant
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user