Skip to content

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 go@1.19.8
Package "vim@latest" already in devbox.json
Package "go@1.19.8" already in devbox.json
Packages vim@latest, go@1.19.8 were already in devbox.json and were not modified

# Add a mix of existing and new packages
> devbox add vim go@1.19.8 fzf
Package "vim@latest" already in devbox.json
Package "go@1.19.8" 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, go@1.19.8 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 Lagoja, ipince and mikeland73 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