Skip to content

Commit

Permalink
fix: split override envs properly (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjnagel authored Jul 19, 2024
1 parent 6ca1dd9 commit f6360e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pkg/bundle/overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (b *Bundle) loadVariables(pkg types.Package, bundleExportedVars map[string]
// env vars (vars that start with UDS_)
for _, envVar := range os.Environ() {
if strings.HasPrefix(envVar, config.EnvVarPrefix) {
parts := strings.Split(envVar, "=")
parts := strings.SplitN(envVar, "=", 2)
pkgVars[strings.ToUpper(strings.TrimPrefix(parts[0], config.EnvVarPrefix))] = parts[1]
overVarsData[strings.ToUpper(strings.TrimPrefix(parts[0], config.EnvVarPrefix))] = overrideData{parts[1], valuesources.Env}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/e2e/variable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func TestBundleWithEnvVarHelmOverrides(t *testing.T) {
e2e.HelmDepUpdate(t, "src/test/packages/helm/unicorn-podinfo")
e2e.CreateZarfPkg(t, "src/test/packages/helm", false)
color := "purple"
b64Secret := "dGhhdCBhaW50IG15IHRydWNr"
b64Secret := "dGhhdCBhaW50IG15IHRydWNrCg=="
err := os.Setenv("UDS_CONFIG", filepath.Join("src/test/bundles/07-helm-overrides", "uds-config.yaml"))
require.NoError(t, err)
err = os.Setenv("UDS_UI_COLOR", color)
Expand Down

0 comments on commit f6360e5

Please sign in to comment.