-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[shell] warn when removing non-existent package (#230)
## Summary Previously, devbox would indicate that an uninstall happened even if a package wasn't part of the `devbox.json` packages. This isn't great, especially if a user made an inadvertent typo. This PR prints a warning for such a scenario. It also changes logic to print the confirmation messages outside `devbox shell`. ## How was it tested? ``` > cd testdata/rust/rust-stable > devbox shell (devbox)> devbox add go_1_18 nodejs # package doesn't exist (devbox)> devbox rm php Warning: the following packages were not found in your devbox.json: php Uninstalling nix packages. This may take a while...done. No packages removed. # subset of packages exist (devbox) > devbox rm php rummy nodejs Warning: the following packages were not found in your devbox.json: php, rummy Uninstalling nix packages. This may take a while...done. nodejs is now removed. Run `hash -r` to ensure your shell is updated. # package exists (devbox)> devbox rm go_1_18 Uninstalling nix packages. This may take a while...done. go_1_18 is now removed. Run `hash -r` to ensure your shell is updated. ```
- Loading branch information
Showing
3 changed files
with
40 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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