From dbb840c1e5c88e926f42b250bb8d965e7a333901 Mon Sep 17 00:00:00 2001 From: Savil Srivastava <676452+savil@users.noreply.github.com> Date: Thu, 14 Sep 2023 12:03:17 -0700 Subject: [PATCH 1/2] [Script Exit on Error] enable feature flag, and add stability advice to CICD docs --- docs/app/docs/continuous_integration/github_action.md | 2 ++ internal/boxcli/featureflag/script_exit_on_error.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/app/docs/continuous_integration/github_action.md b/docs/app/docs/continuous_integration/github_action.md index 9bceff6511c..d71d5dfb57c 100644 --- a/docs/app/docs/continuous_integration/github_action.md +++ b/docs/app/docs/continuous_integration/github_action.md @@ -45,3 +45,5 @@ jobs: ## Configuring the Action See the [GitHub Marketplace page](https://github.com/marketplace/actions/devbox-installer) for the latest configuration settings and an example. + +For stability over new features and bug fixes, consider pinning `devbox-version`. Remember to update this pinned version when you update your local Devbox via `devbox version update`. 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") From f8cc8590862c66e5ee02148d8713ffe9dbb6150f Mon Sep 17 00:00:00 2001 From: Savil Srivastava <676452+savil@users.noreply.github.com> Date: Thu, 14 Sep 2023 12:22:39 -0700 Subject: [PATCH 2/2] lint fix --- internal/boxcli/featureflag/feature.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/boxcli/featureflag/feature.go b/internal/boxcli/featureflag/feature.go index d70f9835fe2..49ddadff8a4 100644 --- a/internal/boxcli/featureflag/feature.go +++ b/internal/boxcli/featureflag/feature.go @@ -19,6 +19,9 @@ type feature struct { var features = map[string]*feature{} +// Prevent lint complaining about unused function +// +//nolint:unparam func disable(name string) *feature { if features[name] == nil { features[name] = &feature{name: name} @@ -27,6 +30,9 @@ func disable(name string) *feature { return features[name] } +// Prevent lint complaining about unused function +// +//nolint:unparam func enable(name string) *feature { if features[name] == nil { features[name] = &feature{name: name}