Skip to content

Commit 5ea67ad

Browse files
authored
Flip swich on strict devbox run feature flag (#503)
## Summary Enable print-dev-env based devbox run by default. A user can always disable it by passing `DEVBOX_FEATURE_STRICT_RUN=0`. Note that I renamed the feature because the other name was a mouthful. ## How was it tested? ```` ./devbox run test_single ./devbox run hello # success. would've failed otherwise DEVBOX_FEATURE_STRICT_RUN=0 ./devbox run hello # fails
1 parent b6f92a8 commit 5ea67ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package featureflag
22

3-
// NixDevEnvRun controls the implementation of `devbox run`. When enabled, `devbox run`
3+
// StrictRun controls the implementation of `devbox run`. When enabled, `devbox run`
44
// runs the script in the environment returned by `nix print-dev-env`. This means the
55
// environment is much more "strict" or "pure", since it will _not_ include parts of
66
// the host's environment like `devbox shell` does.
7-
var NixDevEnvRun = disabled("NIX_DEV_ENV_RUN")
7+
var StrictRun = enabled("STRICT_RUN")

internal/impl/devbox.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func (d *Devbox) Shell() error {
250250
}
251251

252252
func (d *Devbox) RunScript(cmdName string, cmdArgs []string) error {
253-
if featureflag.NixDevEnvRun.Disabled() {
253+
if featureflag.StrictRun.Disabled() {
254254
return d.RunScriptInNewNixShell(cmdName)
255255
}
256256

0 commit comments

Comments
 (0)