feat(cli): deno remove --global as alias for deno uninstall --global#35327
Merged
Conversation
…l --global` `deno remove --global <name>` now removes a globally installed executable script, behaving exactly like `deno uninstall --global <name>`. The flag is parsed in `remove_parse` and routed to the same `Uninstall` subcommand the uninstaller uses, so the two share one code path. `--root` is supported (and requires `--global`), and a global removal targets a single executable, so passing multiple names with `--global` is rejected, matching `uninstall`. Adds flag-parse unit tests and a hermetic spec test that installs a local script globally and removes it via `deno remove --global`.
Member
Author
|
Prompted by discussion here: expressjs/expressjs.com#2395 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
deno uninstall --global <name>removes a globally installed executablescript, but
deno removehad no global counterpart, so users who reachedfor
deno remove --global <name>(the natural symmetric spelling) got anunknown-argument error and had to remember the separate
uninstallverb.This adds
--global(and-g) todeno removeas an alias fordeno uninstall --global, removing the globally installed executable.The flag is handled in
remove_parseand routed to the sameUninstallsubcommand the uninstaller already uses, so both commands share one code
path rather than duplicating logic.
--rootis supported and requires--global, matchinguninstall, and--lockfile-only/--package-jsonconflict with
--globalsince they are meaningless for a global removal.A global removal targets a single executable, so passing multiple names
together with
--globalis rejected, mirroring howuninstall --globalrejects extra packages.