Repository navigation
fix(uninstall): preserve dirty-repo guard in JSON mode - #243
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a regression where skillshare uninstall --json implicitly enabled --force, causing dirty tracked repositories to be uninstalled without requiring explicit user intent. JSON mode remains non-interactive, but now preserves the dirty-repo guard unless --force is provided.
Changes:
- Removed the implicit
--forcebehavior from globaluninstall --json, while keeping JSON non-interactive (confirmation suppressed). - Updated uninstall pre-flight behavior so dirty tracked repos fail with a JSON error when uninstalling a single target, and are skipped quietly in mixed JSON batches.
- Added/updated integration coverage and adjusted docs/reference wording to reflect the new boundary.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
cmd/skillshare/uninstall.go |
Stops treating --json as implicit --force for global uninstall; updates dirty-repo handling and confirmation gating in JSON mode. |
tests/integration/json_output_test.go |
Replaces the old “json implies force” coverage with tests for “skip confirmation” and “dirty repo requires explicit force” (including mixed-batch behavior). |
website/docs/reference/commands/uninstall.md |
Updates command reference to clarify JSON behavior in global mode and the --force requirement for dirty tracked repos. |
skills/skillshare/SKILL.md |
Updates bundled skill examples to reflect the new uninstall JSON/force boundary. |
skills/skillshare/references/install.md |
Updates documentation snippet describing uninstall JSON behavior to match the new semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ui.StepSkip(t.name, "uncommitted changes, use --force") | ||
| } | ||
| ui.StepSkip(t.name, "uncommitted changes, use --force") | ||
| continue | ||
| } | ||
| if !opts.jsonOutput { |
There was a problem hiding this comment.
Fixed in 50b40a4. When every batch target is a dirty tracked repo, the JSON error now names uncommitted changes and points to explicit --force. Added integration coverage for two dirty repos; make check passes.
|
@runkids ready for reveiw |
|
Thanks! |
--json implied --force, silently overwriting existing skills/agents in source when collecting. Decouple confirmation-skip from the overwrite guard, same fix as PR #243 for uninstall.
Type
proposals/only — see CONTRIBUTING.md)Linked Issue
Closes #242
What changed
Global skill
uninstall --jsonno longer setsforce=trueinternally. JSON mode remains non-interactive, but a dirty tracked repository now requires an explicit--force.The regression coverage checks four paths:
--json --forceretains the previous forced behavior.The CLI help, command reference, and bundled Skillshare skill now describe the updated boundary. This PR does not change project skill uninstall, agent uninstall,
install, orcollectJSON semantics.Validation
make checkSKILLSHARE_TEST_BINARY=/tmp/skillshare-pr-bin go test -v ./tests/integration -run 'TestUninstall_JSON_(SkipsConfirmation|DirtyRepoRequiresExplicitForce)' -count=1Checklist
make check) — for code changes