Skip to content

Commit d83ab44

Browse files
authored
[script set -e] enable feature flag (#1533)
## Summary ## How was it tested?
1 parent c70dcb1 commit d83ab44

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

internal/boxcli/featureflag/script_exit_on_error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ package featureflag
55

66
// ScriptExitOnError controls whether scripts defined in devbox.json
77
// and executed via `devbox run` should exit if any command within them errors.
8-
var ScriptExitOnError = disable("SCRIPT_EXIT_ON_ERROR")
8+
var ScriptExitOnError = enable("SCRIPT_EXIT_ON_ERROR")

internal/shellgen/scripts.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ func WriteScriptFile(devbox devboxer, name, body string) (err error) {
103103
defer script.Close() // best effort: close file
104104

105105
if featureflag.ScriptExitOnError.Enabled() {
106-
// NOTE: Devbox scripts will run using `sh` for consistency.
107-
// However, we need to disable this for `fish` shell if/when we allow this for init_hooks,
108-
// since init_hooks run in the host shell, and not `sh`.
106+
// NOTE: Devbox scripts run using `sh` for consistency.
109107
body = fmt.Sprintf("set -e\n\n%s", body)
110108
}
111109
_, err = script.WriteString(body)

0 commit comments

Comments
 (0)