Skip to content

Commit 53e6022

Browse files
committed
rename to preservePathStack
1 parent df4820e commit 53e6022

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

internal/boxcli/install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func installCmdFunc(cmd *cobra.Command, flags runCmdFlags) error {
3939
if err != nil {
4040
return errors.WithStack(err)
4141
}
42-
if err = box.Install(cmd.Context(), false /*pathStackInPlace*/); err != nil {
42+
if err = box.Install(cmd.Context(), false /*preservePathStack*/); err != nil {
4343
return errors.WithStack(err)
4444
}
4545
fmt.Fprintln(cmd.ErrOrStderr(), "Finished installing packages.")

internal/boxcli/shell.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func runShellCmd(cmd *cobra.Command, flags shellCmdFlags) error {
6666
if flags.printEnv {
6767
// false for includeHooks is because init hooks is not compatible with .envrc files generated
6868
// by versions older than 0.4.6
69-
script, err := box.NixEnv(cmd.Context(), false /*includeHooks*/, false /*pathStackInPlace*/)
69+
script, err := box.NixEnv(cmd.Context(), false /*includeHooks*/, false /*preservePathStack*/)
7070
if err != nil {
7171
return err
7272
}

internal/boxcli/shellenv.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ import (
1515

1616
type shellEnvCmdFlags struct {
1717
envFlag
18-
config configFlags
19-
runInitHook bool
20-
install bool
21-
pure bool
22-
pathStackInPlace bool
18+
config configFlags
19+
runInitHook bool
20+
install bool
21+
pure bool
22+
preservePathStack bool
2323
}
2424

2525
func shellEnvCmd() *cobra.Command {
@@ -50,10 +50,10 @@ func shellEnvCmd() *cobra.Command {
5050
command.Flags().BoolVar(
5151
&flags.pure, "pure", false, "If this flag is specified, devbox creates an isolated environment inheriting almost no variables from the current environment. A few variables, in particular HOME, USER and DISPLAY, are retained.")
5252
command.Flags().BoolVar(
53-
&flags.pure, "path-stack-in-place", true,
53+
&flags.preservePathStack, "preserve-path-stack", false,
5454
"If true, Devbox will not give top priority to the PATH of this project's shellenv. "+
5555
"This project's place in the path stack will be unchanged.")
56-
_ = command.Flags().MarkHidden("path-stack-in-place")
56+
_ = command.Flags().MarkHidden("preserve-path-stack")
5757

5858
flags.config.register(command)
5959
flags.envFlag.register(command)
@@ -79,12 +79,12 @@ func shellEnvFunc(cmd *cobra.Command, flags shellEnvCmdFlags) (string, error) {
7979
}
8080

8181
if flags.install {
82-
if err := box.Install(cmd.Context(), flags.pathStackInPlace); err != nil {
82+
if err := box.Install(cmd.Context(), flags.preservePathStack); err != nil {
8383
return "", err
8484
}
8585
}
8686

87-
envStr, err := box.NixEnv(cmd.Context(), flags.runInitHook, flags.pathStackInPlace)
87+
envStr, err := box.NixEnv(cmd.Context(), flags.runInitHook, flags.preservePathStack)
8888
if err != nil {
8989
return "", err
9090
}

0 commit comments

Comments
 (0)