fix: 修复更新流程中 Web UI 提示导致的失败 (v1.7.27)
This commit is contained in:
1 parent
48af319c0d
commit
9253adbbd8
2 files changed
+8
-2
No files matched your search
@@ -6,7 +6,7 @@ import ora from 'ora'
|
||||
import { homedir } from 'node:os'
|
||||
import { join } from 'pathe'
|
||||
import { i18n } from '../i18n'
|
||||
import { createDefaultConfig, ensureCcgDir, getCcgDir, writeCcgConfig } from '../utils/config'
|
||||
import { createDefaultConfig, ensureCcgDir, getCcgDir, readCcgConfig, writeCcgConfig } from '../utils/config'
|
||||
import { getAllCommandIds, installAceTool, installWorkflows } from '../utils/installer'
|
||||
import { migrateToV1_4_0, needsMigration } from '../utils/migration'
|
||||
|
||||
@@ -32,8 +32,14 @@ export async function init(options: InitOptions = {}): Promise<void> {
|
||||
let aceToolToken = ''
|
||||
|
||||
// Skip MCP configuration if --skip-mcp is passed (used during update)
|
||||
// Also preserve existing liteMode setting from config
|
||||
if (options.skipMcp) {
|
||||
mcpProvider = 'skip'
|
||||
// Read existing config to preserve liteMode setting
|
||||
const existingConfig = await readCcgConfig()
|
||||
if (existingConfig?.performance?.liteMode !== undefined) {
|
||||
liteMode = existingConfig.performance.liteMode
|
||||
}
|
||||
}
|
||||
else if (!options.skipPrompt) {
|
||||
console.log()
|
||||
|
||||
@@ -323,7 +323,7 @@ async function performUpdate(fromVersion: string, toVersion: string, isNewVersio
|
||||
try {
|
||||
// Use npx to run the latest version's init command with --force flag
|
||||
// This ensures the new version's PACKAGE_ROOT is used for binary installation
|
||||
await execAsync(`npx --yes ccg-workflow@latest init --force --skip-mcp`, {
|
||||
await execAsync(`npx --yes ccg-workflow@latest init --force --skip-mcp --skip-prompt`, {
|
||||
timeout: 120000,
|
||||
env: {
|
||||
...process.env,
|
||||
|
||||
Reference in new issue
Block a user