Skip to content

Commit f4f29af

Browse files
committed
Change error message for devbox add when a package is not found
1 parent 92bb293 commit f4f29af

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/boxcli/add.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ import (
1010
"github.com/spf13/cobra"
1111
"go.jetpack.io/devbox"
1212
"go.jetpack.io/devbox/internal/boxcli/usererr"
13-
"go.jetpack.io/devbox/internal/nix"
1413
)
1514

16-
const toSearchForPackages = "To search for packages use https://search.nixos.org/packages"
15+
const toSearchForPackages = "To search for packages, use the `devbox search` command"
1716

1817
type addCmdFlags struct {
1918
config configFlags
@@ -37,7 +36,7 @@ func addCmd() *cobra.Command {
3736
return nil
3837
}
3938
err := addCmdFunc(cmd, args, flags)
40-
if errors.Is(err, nix.ErrPackageNotFound) {
39+
if err != nil {
4140
return usererr.New("%s\n\n%s", err, toSearchForPackages)
4241
}
4342
return err

0 commit comments

Comments
 (0)