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
[shellenv] add --recompute flag with default=true, while keep global shellenv's recompute flag with default=false (#2013)
## Summary
Credit to @dax and #1963 for pointing out the need for this, and
pioneering this solution.
This PR merely nudges the code to be a bit neater.
## How was it tested?
```
% git diff
diff --git a/internal/boxcli/shellenv.go b/internal/boxcli/shellenv.go
index 991c2be..8076e125 100644
--- a/internal/boxcli/shellenv.go
+++ b/internal/boxcli/shellenv.go
@@ -78,6 +78,9 @@ func shellEnvFunc(
cmd *cobra.Command,
flags shellEnvCmdFlags,
) (string, error) {
+ fmt.Printf("shellenv --recompute flag is %v\n", flags.recompute)
+ return "", nil
+
env, err := flags.Env(flags.config.path)
if err != nil {
return "", err
```
compiled via `devbox run build`, and then:
```
% devbox shellenv
shellenv --recompute flag is true
hash -r
% devbox global shellenv
shellenv --recompute flag is false
hash -r
```
0 commit comments