Skip to content

Commit 9386506

Browse files
authored
[direnv] change default hooks for shell --print-env (#928)
## Summary title says it ## How was it tested? - `devbox shell --print-env` - confirm output does not contain `. /path/to/.hooks.sh`
1 parent 54e5518 commit 9386506

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/boxcli/shell.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ func runShellCmd(cmd *cobra.Command, flags shellCmdFlags) error {
4848
}
4949

5050
if flags.PrintEnv {
51-
script, err := box.PrintEnv(cmd.Context(), false /*useCachedPrintDevEnv*/, true /*includeHooks*/)
51+
// false for includeHooks is because init hooks is not compatible with .envrc files generated
52+
// by versions older than 0.4.6
53+
script, err := box.PrintEnv(cmd.Context(), false /*useCachedPrintDevEnv*/, false /*includeHooks*/)
5254
if err != nil {
5355
return err
5456
}

0 commit comments

Comments
 (0)