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
Revert "[bin wrappers] add --omit-wrappers-from-path to shellenv to prevent a binary from invoking a wrapped-binary. (#1151)" (#1159)
## Summary
Reverting due to regression:
Within a devbox script if any environment variable has been exported,
and
if a devbox-plugin also sets that env-var, then the devbox-plugin
env-var
will be set for the wrapped-binary.
Specifically, in the `lapp-stack/devbox.json`, we have:
```
"run_test": [
"mkdir -p /tmp/devbox/lapp",
"export PGHOST=/tmp/devbox/lapp",
"initdb",
```
but the PGHOST that `initdb` sees is a different value i.e. the one set
by the devbox plugin.
In the code being reverted, the wrapped-bin's bash script would always
invoke
`eval $(devbox shellenv --omit-wrappers-from-path=true)` in order to
omit wrappers
from PATH. A side-effect is that the PGHOST would also get overridden.
## How was it tested?
no testing done.
straight revert, tests should pass.
&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.")
48
47
49
-
// This flag is to be used by our generated bin-wrappers shell script.
50
-
command.Flags().BoolVar(
51
-
&flags.omitWrappersFromPath, "omit-wrappers-from-path", false, "If this flag is specified, "+
52
-
"the PATH from shellenv will not include the binary wrappers")
0 commit comments