diff --git a/internal/boxcli/featureflag/script_exit_on_error.go b/internal/boxcli/featureflag/script_exit_on_error.go index e5a562cb250..920d034e2fb 100644 --- a/internal/boxcli/featureflag/script_exit_on_error.go +++ b/internal/boxcli/featureflag/script_exit_on_error.go @@ -5,4 +5,4 @@ package featureflag // ScriptExitOnError controls whether scripts defined in devbox.json // and executed via `devbox run` should exit if any command within them errors. -var ScriptExitOnError = disable("SCRIPT_EXIT_ON_ERROR") +var ScriptExitOnError = enable("SCRIPT_EXIT_ON_ERROR") diff --git a/internal/shellgen/scripts.go b/internal/shellgen/scripts.go index b92bc58ee7b..2fdaa942b39 100644 --- a/internal/shellgen/scripts.go +++ b/internal/shellgen/scripts.go @@ -103,9 +103,7 @@ func WriteScriptFile(devbox devboxer, name, body string) (err error) { defer script.Close() // best effort: close file if featureflag.ScriptExitOnError.Enabled() { - // NOTE: Devbox scripts will run using `sh` for consistency. - // However, we need to disable this for `fish` shell if/when we allow this for init_hooks, - // since init_hooks run in the host shell, and not `sh`. + // NOTE: Devbox scripts run using `sh` for consistency. body = fmt.Sprintf("set -e\n\n%s", body) } _, err = script.WriteString(body)