fix(cli): skip proxy config for help

This commit is contained in:
Vincent Koc
2026-05-10 10:13:29 +08:00
parent 074161415b
commit e855b9c8d9

View File

@@ -445,7 +445,7 @@ export async function runCli(argv: string[] = process.argv) {
proxyHandle = null;
handle?.kill("SIGTERM");
};
if (shouldStartProxyForCli(normalizedArgv)) {
if (!isHelpOrVersionInvocation && shouldStartProxyForCli(normalizedArgv)) {
const config = await readBestEffortCliConfig();
const unownedPrimary = await resolveUnownedCliPrimary({ argv: normalizedArgv, config });
if (unownedPrimary) {
@@ -545,7 +545,8 @@ export async function runCli(argv: string[] = process.argv) {
return;
}
const shouldUseCliEnvProxy = shouldStartProxyForCli(normalizedArgv);
const shouldUseCliEnvProxy =
!isHelpOrVersionInvocation && shouldStartProxyForCli(normalizedArgv);
const bootstrapProxyBeforeFastPath =
shouldUseCliEnvProxy && shouldBootstrapCliProxyBeforeFastPath();
if (