Skip to content

[update] update description for update command #1115

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 1 commit into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions internal/boxcli/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package boxcli
import (
"github.com/pkg/errors"
"github.com/spf13/cobra"

"go.jetpack.io/devbox"
)

Expand All @@ -18,10 +19,10 @@ func updateCmd() *cobra.Command {

command := &cobra.Command{
Use: "update [pkg]...",
Short: "Updates packages in your devbox",
Long: "Updates one, many, or all packages in your devbox. " +
Short: "Update packages in your devbox",
Long: "Update one, many, or all packages in your devbox. " +
"If no packages are specified, all packages will be updated. " +
"Only updates versioned packages (e.g. `[email protected]`), not packages that are pinned to a nix channel (e.g. `python3`)",
"Only update versioned packages (e.g. `[email protected]`), not packages that are pinned to a nix channel (e.g. `python3`)",
Copy link
Contributor

Choose a reason for hiding this comment

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

updates is a bit more accurate because it is describing what it does instead of being imperative. (the first 2 uses can be imperative so update is ok.)

Either way, this functionality is actually changing in #1107 so I'll update it there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then I think it should be Only versioned packages are updated ...

PreRunE: ensureNixInstalled,
RunE: func(cmd *cobra.Command, args []string) error {
return updateCmdFunc(cmd, args, flags)
Expand All @@ -32,11 +33,7 @@ func updateCmd() *cobra.Command {
return command
}

func updateCmdFunc(
cmd *cobra.Command,
args []string,
flags *updateCmdFlags,
) error {
func updateCmdFunc(cmd *cobra.Command, args []string, flags *updateCmdFlags) error {
box, err := devbox.Open(flags.config.path, cmd.ErrOrStderr())
if err != nil {
return errors.WithStack(err)
Expand Down
3 changes: 3 additions & 0 deletions internal/impl/update.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2023 Jetpack Technologies Inc and contributors. All rights reserved.
// Use of this source code is governed by the license in the LICENSE file.

package impl

import (
Expand Down