From 81905688a60a1b7e7b7f07e1e469c4f7c1c1e385 Mon Sep 17 00:00:00 2001 From: egg Date: Wed, 17 Dec 2025 14:01:14 +0800 Subject: [PATCH] fix: Escape parentheses in batch script echo statements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parentheses in Chinese text (本地模式) and (雲端模式) were being interpreted as if/else block delimiters, causing both echo statements to execute regardless of the DATABASE_TYPE condition. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- scripts/build-client.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build-client.bat b/scripts/build-client.bat index 2967393..0522963 100644 --- a/scripts/build-client.bat +++ b/scripts/build-client.bat @@ -349,11 +349,11 @@ REM 使用 PowerShell 更新 database.type (使用 UTF8 without BOM) if /i "%DATABASE_TYPE%"=="sqlite" ( REM SQLite 模式: 設定 type=sqlite,清空 MySQL 連線資訊 powershell -Command "$config = Get-Content '%CONFIG_FILE%' -Raw | ConvertFrom-Json; $config.backend.database.type = 'sqlite'; $config.backend.database.host = ''; $config.backend.database.user = ''; $config.backend.database.password = ''; $config.backend.database.database = ''; $json = $config | ConvertTo-Json -Depth 10; [System.IO.File]::WriteAllText('%CONFIG_FILE%', $json, [System.Text.UTF8Encoding]::new($false))" - echo %GREEN%[OK]%NC% 資料庫類型已設定為: SQLite (本地模式) + echo %GREEN%[OK]%NC% 資料庫類型已設定為: SQLite ^(本地模式^) ) else ( REM MySQL 模式: 僅設定 type=mysql,保留連線資訊 powershell -Command "$config = Get-Content '%CONFIG_FILE%' -Raw | ConvertFrom-Json; $config.backend.database.type = 'mysql'; $json = $config | ConvertTo-Json -Depth 10; [System.IO.File]::WriteAllText('%CONFIG_FILE%', $json, [System.Text.UTF8Encoding]::new($false))" - echo %GREEN%[OK]%NC% 資料庫類型已設定為: MySQL (雲端模式) + echo %GREEN%[OK]%NC% 資料庫類型已設定為: MySQL ^(雲端模式^) ) if errorlevel 1 (