Skip to content

[ENHANCEMENT] Warn when ember destroy finds no files to remove#11007

Open
ashurHQ wants to merge 1 commit into
ember-cli:masterfrom
ashurHQ:enhancement/destroy-warn-on-no-files
Open

[ENHANCEMENT] Warn when ember destroy finds no files to remove#11007
ashurHQ wants to merge 1 commit into
ember-cli:masterfrom
ashurHQ:enhancement/destroy-warn-on-no-files

Conversation

@ashurHQ
Copy link
Copy Markdown

@ashurHQ ashurHQ commented Apr 24, 2026

Closes #8499.

Why

ember destroy previously gave no feedback when it failed to remove files because the blueprint or entity didn't match anything on disk. The CLI would print "uninstalling " and other progress lines as if everything succeeded, leaving users wondering whether the command actually worked.

What changed

processFilesForUninstall now emits a yellow warning when the blueprint has files defined but none of them exist on disk. The warning names the blueprint and entity so users can see exactly what didn't match.

Why per-blueprint instead of per-file

The TypeScript-undecided code path in processFilesForUninstall pushes both the .ts and .js variants of each expected output into the candidate list, since only one of them will actually exist on disk. A per-file "not-found" warning would always print a false positive for whichever variant didn't match. Aggregating to "did this blueprint find anything to remove?" sidesteps that cleanly without needing TS-pair tracking.

Test plan

  • New acceptance test in tests/acceptance/destroy-test.js covers ember destroy blueprint does-not-exist against a fresh app and asserts the warning lands in the output.
  • Existing Acceptance: ember destroy suite still passes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ember destroy doesn't notify if it fails to remove a blueprint(wrong name or directory)

1 participant