Skip to content

Commit 7dfdbb7

Browse files
fix: make --force flag skip confirmation prompt in prune command (#20)
* Initial plan * fix: make --force flag skip confirmation prompt in prune command Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com> * chore: remove package-lock.json and add to gitignore Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com>
1 parent eaef3c7 commit 7dfdbb7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ web_modules/
5656
# Optional npm cache directory
5757
.npm
5858

59+
# npm lock file (this project uses bun.lock)
60+
package-lock.json
61+
5962
# Optional eslint cache
6063
.eslintcache
6164

src/commands/prune.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function createPruneCommand(): Command {
2525
)
2626
.option(
2727
"--force",
28-
"Remove worktrees even if they have uncommitted changes",
28+
"Remove worktrees even if they have uncommitted changes and skip confirmation prompt",
2929
false,
3030
)
3131
.option(
@@ -185,7 +185,7 @@ async function runPrune(options: PruneCommandOptions): Promise<void> {
185185
}
186186
}
187187

188-
if (!options.yes) {
188+
if (!options.yes && !options.force) {
189189
const answers = await inquirer.prompt([
190190
{
191191
type: "confirm",

0 commit comments

Comments
 (0)