From 56cf0c072cd135256d9a15825092f3e3d1979019 Mon Sep 17 00:00:00 2001 From: egg Date: Thu, 18 Dec 2025 08:29:10 +0800 Subject: [PATCH] fix: Batch script syntax error in build-client.bat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- scripts/build-client.bat | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/build-client.bat b/scripts/build-client.bat index e1433b8..db844fd 100644 --- a/scripts/build-client.bat +++ b/scripts/build-client.bat @@ -402,16 +402,17 @@ echo %BLUE%[STEP]%NC% 打包 Electron 應用... cd /d "%CLIENT_DIR%" REM 驗證 BUILD_TARGET -if /i not "%BUILD_TARGET%"=="nsis" if /i not "%BUILD_TARGET%"=="portable" ( - echo %RED%[ERROR]%NC% 無效的打包目標: %BUILD_TARGET% - echo %BLUE%[INFO]%NC% 有效選項: nsis, portable - exit /b 1 -) +if /i "%BUILD_TARGET%"=="nsis" goto :valid_target +if /i "%BUILD_TARGET%"=="portable" goto :valid_target +echo %RED%[ERROR]%NC% 無效的打包目標: %BUILD_TARGET% +echo %BLUE%[INFO]%NC% 有效選項: nsis, portable +exit /b 1 +:valid_target if /i "%BUILD_TARGET%"=="nsis" ( - echo %BLUE%[INFO]%NC% 目標平台: Windows (NSIS 安裝檔) - 推薦 + echo %BLUE%[INFO]%NC% 目標平台: Windows NSIS 安裝檔 - 推薦 ) else ( - echo %BLUE%[INFO]%NC% 目標平台: Windows (Portable) + echo %BLUE%[INFO]%NC% 目標平台: Windows Portable echo %YELLOW%[WARN]%NC% 注意: Portable 模式的臨時資料夾會在關閉時清空 echo %YELLOW%[WARN]%NC% SQLite 資料庫已自動儲存到 %%APPDATA%%\Meeting-Assistant )