From c4fd87f74b4bca66687a35296c5a7f4cd59005d9 Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Tue, 20 Jan 2026 15:02:31 -0800 Subject: [PATCH] warn about conflicting provider env var --- src/pkg/stacks/stacks.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pkg/stacks/stacks.go b/src/pkg/stacks/stacks.go index 26a3a753a..87c0dadcd 100644 --- a/src/pkg/stacks/stacks.go +++ b/src/pkg/stacks/stacks.go @@ -227,7 +227,11 @@ func LoadStackEnv(params Parameters, overload bool) error { paramsMap := params.ToMap() for key, value := range paramsMap { if envValue, ok := currentEnv[key]; ok && envValue != value && !overload { - term.Warnf("The variable %q is set in both the stack and the environment. The value from the environment will be used.\n", key) + if key == "DEFANG_PROVIDER" { + term.Warnf("The variable DEFANG_PROVIDER is set to %q in the environment, but the stack specifies %q. The value from the stack will be used.\n", envValue, value) + } else { + term.Warnf("The variable %q is set to %q in the environment, but the stack specifies %q. The value from the environment will be used.\n", key, envValue, value) + } } if _, ok := currentEnv[key]; !ok || overload { err := os.Setenv(key, value)