Skip to content

Commit f335ba1

Browse files
committed
Remove redundant --force flag, consolidate to --yes with -f alias
The --force and --yes flags had identical behavior (skip confirmation prompt). This consolidates to a single --yes flag while keeping both -y and -f as short aliases for backward compatibility.
1 parent a4e5715 commit f335ba1

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

plugins/sentry-cli/skills/sentry-cli/SKILL.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ Delete a project
186186

187187
**Flags:**
188188
- `-y, --yes - Skip confirmation prompt`
189-
- `-f, --force - Force deletion without confirmation`
190189
- `-n, --dry-run - Validate and show what would be deleted without deleting`
191190
- `--json - Output as JSON`
192191
- `--fields <value> - Comma-separated fields to include in JSON output (dot.notation supported)`

src/commands/project/delete.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async function confirmDeletion(
6464
if (!isatty(0)) {
6565
throw new CliError(
6666
`Refusing to delete '${expected}' in non-interactive mode. ` +
67-
"Use --yes or --force to confirm."
67+
"Use --yes to confirm."
6868
);
6969
}
7070

@@ -154,7 +154,6 @@ function buildResult(
154154

155155
type DeleteFlags = {
156156
readonly yes: boolean;
157-
readonly force: boolean;
158157
readonly "dry-run": boolean;
159158
readonly json: boolean;
160159
readonly fields?: string[];
@@ -170,7 +169,6 @@ export const deleteCommand = buildCommand({
170169
" sentry project delete acme-corp/my-app\n" +
171170
" sentry project delete my-app\n" +
172171
" sentry project delete acme-corp/my-app --yes\n" +
173-
" sentry project delete acme-corp/my-app --force\n" +
174172
" sentry project delete acme-corp/my-app --dry-run",
175173
},
176174
output: {
@@ -209,18 +207,13 @@ export const deleteCommand = buildCommand({
209207
brief: "Skip confirmation prompt",
210208
default: false,
211209
},
212-
force: {
213-
kind: "boolean",
214-
brief: "Force deletion without confirmation",
215-
default: false,
216-
},
217210
"dry-run": {
218211
kind: "boolean",
219212
brief: "Validate and show what would be deleted without deleting",
220213
default: false,
221214
},
222215
},
223-
aliases: { y: "yes", f: "force", n: "dry-run" },
216+
aliases: { y: "yes", f: "yes", n: "dry-run" },
224217
},
225218
async *func(this: SentryContext, flags: DeleteFlags, target: string) {
226219
const { cwd } = this;
@@ -250,7 +243,7 @@ export const deleteCommand = buildCommand({
250243
}
251244

252245
// Confirmation gate
253-
if (!(flags.yes || flags.force)) {
246+
if (!flags.yes) {
254247
const confirmed = await confirmDeletion(orgSlug, project);
255248
if (!confirmed) {
256249
log.info("Cancelled.");

0 commit comments

Comments
 (0)