You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Update help text when unified env feature is on. This feature also
enables `run` to accept arbitrary commands, and to pass arguments to
scripts.
## How was it tested?
```
> DEVBOX_FEATURE_UNIFIED_ENV=1 ./devbox run --help
Starts a new shell and runs your script or command in it, exiting when done.
The script must be defined in `devbox.json`, or else it will be interpreted as an arbitrary command. You can pass arguments to your script or command. Everything after `--` will be passed verbatim into your command (see examples).
Usage:
devbox run [<script> | <cmd>] [flags]
Examples:
Run a command directly:
devbox add cowsay
devbox run cowsay hello
devbox run -- cowsay -d hello
Run a script (defined as `"moo": "cowsay moo"`) in your devbox.json:
devbox run moo
Flags:
-c, --config string path to directory containing a devbox.json config file
-h, --help help for run
Global Flags:
-q, --quiet suppresses logs.
```
longHelp:="Starts a new shell and runs your script or command in it, exiting when done.\n\n"+
22
+
"The script must be defined in `devbox.json`, or else it will be interpreted as an "+
23
+
"arbitrary command. You can pass arguments to your script or command. Everything "+
24
+
"after `--` will be passed verbatim into your command (see examples).\n\n"
25
+
shortHelp:="Runs a script or command in a shell with access to your packages"
26
+
example:="\nRun a command directly:\n\n devbox add cowsay\n devbox run cowsay hello\n "+
27
+
"devbox run -- cowsay -d hello\n\nRun a script (defined as `\"moo\": \"cowsay moo\"`) "+
28
+
"in your devbox.json:\n\n devbox run moo"
29
+
iffeatureflag.UnifiedEnv.Disabled() {
30
+
shortHelp="Starts a new devbox shell and runs the target script"
31
+
longHelp="Starts a new interactive shell and runs your target script in it. The shell will "+
32
+
"exit once your target script is completed or when it is terminated via CTRL-C. "+
33
+
"Scripts can be defined in your `devbox.json`"
34
+
example=""
35
+
}
20
36
flags:=runCmdFlags{}
21
37
command:=&cobra.Command{
22
-
Use: "run <script>",
23
-
Short: "Starts a new devbox shell and runs the target script",
24
-
Long: "Starts a new interactive shell and runs your target script in it. The shell will exit once your target script is completed or when it is terminated via CTRL-C. Scripts can be defined in your `devbox.json`",
0 commit comments