Skip to content

uninstall ignores global --dry-run and deletes all managed files while reporting a preview #2952

Description

@StuntDevLab

Summary

ecc --help documents a global flag:

--dry-run          Preview actions without executing (sets ECC_DRY_RUN=1)

The uninstall command does not honor it. Running npx ecc-universal --dry-run uninstall permanently deleted all 807 ECC-managed files.

Environment

  • ECC 2.2.0 via npx ecc-universal
  • Linux, Claude Code
  • Managed home install: --profile developer --target claude (target id claude-home)

Reproduction

  1. npx ecc-universal install --profile developer --target claude
  2. npx ecc-universal --dry-run uninstall
  3. Output reports:
Uninstall summary:

- claude-home
  Status: UNINSTALLED
  Install-state: /home/<user>/.claude/ecc/install-state.json
  Removed paths: 807
  1. ~/.claude/{skills,commands,agents,rules,hooks} and ecc/install-state.json are gone.

Expected

No filesystem changes. Output phrased as a preview (e.g. Would remove: 807 paths).

Actual

All managed files deleted. A subsequent real uninstall reports:

No ECC install-state files found for the current home/project context.

Contributing factor

The output is written in the past tense — Status: UNINSTALLED, Removed paths: 807 — so a dry run is textually indistinguishable from a real one. A user reading the output carefully still gets no signal that deletion occurred.

Notes

  • ecc help uninstall lists a subcommand-level [--dry-run]. That form was not tested; the global prefix form is what failed.
  • Suggested fix: honor ECC_DRY_RUN in uninstall, or have the CLI reject the global flag for destructive subcommands rather than silently ignoring it.
  • Preview output should use conditional wording ("would remove") so a dry run cannot be mistaken for a completed one.

Severity

Data loss. Recovery required a full reinstall.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions