Skip to content

Commit 115a550

Browse files
suryaiyer95claude
andcommitted
fix: use yargs built-in --no- negation for --no-oauth flag
Define `oauth` as a boolean (default `true`) so `--no-oauth` works via yargs' built-in prefix negation instead of a custom `no-oauth` option that conflicts with yargs' `--no-X` handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 444b06e commit 115a550

File tree

1 file changed

+2
-2
lines changed
  • packages/altimate-code/src/cli/cmd

1 file changed

+2
-2
lines changed

packages/altimate-code/src/cli/cmd/mcp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ export const McpAddCommand = cmd({
425425
.option("url", { type: "string", describe: "Server URL (for remote type)" })
426426
.option("command", { type: "string", describe: "Command to run (for local type)" })
427427
.option("header", { type: "array", string: true, describe: "HTTP headers as key=value (repeatable)" })
428-
.option("no-oauth", { type: "boolean", describe: "Disable OAuth" })
428+
.option("oauth", { type: "boolean", describe: "Enable OAuth", default: true })
429429
.option("global", { type: "boolean", describe: "Add to global config", default: false }),
430430
async handler(args) {
431431
await Instance.provide({
@@ -470,7 +470,7 @@ export const McpAddCommand = cmd({
470470
mcpConfig = {
471471
type: "remote",
472472
url: args.url,
473-
...(args["no-oauth"] ? { oauth: false as const } : {}),
473+
...(!args.oauth ? { oauth: false as const } : {}),
474474
...(Object.keys(headers).length > 0 ? { headers } : {}),
475475
}
476476
}

0 commit comments

Comments
 (0)