Skip to content

Commit 1e0f398

Browse files
betegonclaude
andcommitted
refactor(init): use shared DRY_RUN_FLAG and add -n alias
Every other mutation command imports DRY_RUN_FLAG and spreads DRY_RUN_ALIASES. The init command was defining the flag inline and missing the -n shorthand entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ca14e7c commit 1e0f398

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/commands/init.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import type { SentryContext } from "../context.js";
2222
import { findProjectsBySlug } from "../lib/api/projects.js";
2323
import { looksLikePath, parseOrgProjectArg } from "../lib/arg-parsing.js";
2424
import { buildCommand } from "../lib/command.js";
25+
import { DRY_RUN_ALIASES, DRY_RUN_FLAG } from "../lib/mutate-command.js";
2526
import { ContextError, ValidationError } from "../lib/errors.js";
2627
import { warmOrgDetection } from "../lib/init/prefetch.js";
2728
import { runWizard } from "../lib/init/wizard-runner.js";
@@ -209,11 +210,7 @@ export const initCommand = buildCommand<
209210
brief: "Non-interactive mode (accept defaults)",
210211
default: false,
211212
},
212-
"dry-run": {
213-
kind: "boolean",
214-
brief: "Preview changes without applying them",
215-
default: false,
216-
},
213+
"dry-run": DRY_RUN_FLAG,
217214
features: {
218215
kind: "parsed",
219216
parse: String,
@@ -230,6 +227,7 @@ export const initCommand = buildCommand<
230227
},
231228
},
232229
aliases: {
230+
...DRY_RUN_ALIASES,
233231
y: "yes",
234232
t: "team",
235233
},

0 commit comments

Comments
 (0)