avoid printing env vars conflict warnings if there is no conflict#1807
avoid printing env vars conflict warnings if there is no conflict#1807
Conversation
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.5.0)level=warning msg="[linters_context] running gomodguard failed: unable to read module file go.mod: current working directory must have a go.mod file: if you are not using go modules it is suggested to disable this linter" Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/pkg/stacks/stacks.go`:
- Around line 229-234: The warning is emitted even when the env var doesn't
exist because currentEnv[key] returns "" for missing keys; change the logic in
the loop over paramsMap to perform the existence check first (use the lookup
form like "val, ok := currentEnv[key]") and only call term.Warnf when ok is true
and val != value and !overload; keep the existing branch that sets the env via
os.Setenv when the key is missing or overload is true so behavior remains the
same.
Description
To reduce noise, lets avoid printing this warning if the value in the environment and the value in the stack are the same
Linked Issues
Checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.