Skip to content

Commit 90d7fcf

Browse files
authored
Revert "Add deprecation warning on shell -- cmd (#502)" (#520)
This reverts commit e9a9a4f. Reverts #502 because `run <cmd>` is not released yet.
1 parent 7ac24ea commit 90d7fcf

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

internal/boxcli/shell.go

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package boxcli
66
import (
77
"fmt"
88

9-
"github.com/fatih/color"
109
"github.com/pkg/errors"
1110
"github.com/spf13/cobra"
1211
"go.jetpack.io/devbox"
@@ -22,12 +21,12 @@ func ShellCmd() *cobra.Command {
2221
flags := shellCmdFlags{}
2322
command := &cobra.Command{
2423
Use: "shell -- [<cmd>]",
25-
Short: "Start a new shell with access to your packages",
26-
Long: "Start a new shell with access to your packages.\n\n" +
27-
"The shell will be started using the devbox.json found in the --config flag directory. " +
28-
"If --config isn't set, then devbox recursively searches the current directory and its parents.\n\n" +
29-
"[Deprecated] If invoked as devbox shell -- <cmd>, devbox will run the command in a shell and then exit. " +
30-
"This behavior is deprecated and will be removed. Please use devbox run -- <cmd> instead.",
24+
Short: "Start a new shell or run a command with access to your packages",
25+
Long: "Start a new shell or run a command with access to your packages.\n\n" +
26+
"If invoked without `cmd`, devbox will start an interactive shell.\n" +
27+
"If invoked with a `cmd`, devbox will run the command in a shell and then exit.\n" +
28+
"In both cases, the shell will be started using the devbox.json found in the --config flag directory. " +
29+
"If --config isn't set, then devbox recursively searches the current directory and its parents.",
3130
Args: validateShellArgs,
3231
PreRunE: ensureNixInstalled,
3332
RunE: func(cmd *cobra.Command, args []string) error {
@@ -69,9 +68,6 @@ func runShellCmd(cmd *cobra.Command, args []string, flags shellCmdFlags) error {
6968
}
7069

7170
if len(cmds) > 0 {
72-
fmt.Fprint(cmd.ErrOrStderr(),
73-
color.HiYellowString("[Warning] \"devbox shell -- <cmd>\" is deprecated and will disappear "+
74-
"in a future version. Use \"devbox run -- <cmd>\" instead\n"))
7571
err = box.Exec(cmds...)
7672
} else {
7773
err = box.Shell()

0 commit comments

Comments
 (0)