feat: 关闭自动更新

This commit is contained in:
claude-code-best
2026-04-03 09:39:32 +08:00
parent 119518599e
commit e32c159f35
2 changed files with 316 additions and 0 deletions

View File

@@ -1736,6 +1736,10 @@ export function getAutoUpdaterDisabledReason(): AutoUpdaterDisabledReason | null
if (process.env.NODE_ENV === 'development') {
return { type: 'development' }
}
// 本项目默认关闭自动更新;通过 ENABLE_AUTOUPDATER=1 显式开启
if (!isEnvTruthy(process.env.ENABLE_AUTOUPDATER)) {
return { type: 'config' }
}
if (isEnvTruthy(process.env.DISABLE_AUTOUPDATER)) {
return { type: 'env', envVar: 'DISABLE_AUTOUPDATER' }
}