Skip to content

Conversation

mikeland73
Copy link
Contributor

Summary

Minor UX improvements:

  • Using devbox add without specifying a package shows a helpful message.
  • After installing a package we show the exact version that was installed.

How was it tested?

➜ devbox add
Usage: devbox add <pkg>... [flags]

To search for packages use https://search.nixos.org/packages
➜  devbox add curl
Installing nix packages. This may take a while... done.

curl (curl-7.86.0) is now installed.

@mikeland73 mikeland73 requested review from loreto and savil December 14, 2022 06:29
Copy link
Contributor

@loreto loreto left a comment

Choose a reason for hiding this comment

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

LGTM

if mode == uninstall {
installedVerb = "removed"
}

if len(pkgs) > 0 {

successMsg := fmt.Sprintf("%s is now %s.", pkgs[0], installedVerb)
successMsg := fmt.Sprintf("%s (%s) is now %s.", pkgs[0], info, installedVerb)
if len(pkgs) > 1 {
successMsg = fmt.Sprintf("%s are now %s.", strings.Join(pkgs, ", "), installedVerb)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you also printing the version when you install multiple packages? (we should do it in that case too)

@mikeland73 mikeland73 merged commit bd159a8 into main Dec 14, 2022
@mikeland73 mikeland73 deleted the landau/show-info-on-install branch December 14, 2022 18:07
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