Skip to content

[add] Print messages about actions taken, or not taken. #1527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

savil
Copy link
Collaborator

@savil savil commented Oct 3, 2023

Summary

@Lagoja pointed out that devbox add <existing package> would exit with a no-op.

In this PR, I print messages during the execution of devbox add about changes made to each package.
If no changes were made for a package, then I explicitly print that at the end.

How was it tested?

# Add new package
> devbox add vim
Adding package "vim@latest" to devbox.json

Installing package: vim@latest.

[1/1] vim@latest
[1/1] vim@latest: Success
Recomputing the devbox environment.

# Add --platform to existing package
> devbox add vim --platform x86_64-darwin
Package "vim@latest" already in devbox.json
Added platform x86_64-darwin to package vim@latest

# Add multiple existing packages
> devbox add vim [email protected]
Package "vim@latest" already in devbox.json
Package "[email protected]" already in devbox.json
Packages vim@latest, [email protected] were already in devbox.json and were not modified

# Add a mix of existing and new packages
> devbox add vim [email protected] fzf
Package "vim@latest" already in devbox.json
Package "[email protected]" already in devbox.json
Adding package "fzf@latest" to devbox.json

Installing package: fzf@latest.

[1/1] fzf@latest
[1/1] fzf@latest: Success
Recomputing the devbox environment.
Packages vim@latest, [email protected] were already in devbox.json and were not modified

Copy link
Collaborator Author

savil commented Oct 3, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@savil savil requested review from mikeland73, Lagoja and ipince October 3, 2023 23:18
@savil savil marked this pull request as ready for review October 3, 2023 23:18
Copy link
Contributor

@mikeland73 mikeland73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use ux.FInfo? I feel like these messages are important enough.

@savil savil merged commit 5653c97 into main Oct 4, 2023
@savil savil deleted the savil/msg-after-add-existing branch October 4, 2023 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants