Skip to content

Commit

Permalink
fix: transform set variables to uppercase in dev inspect definition (#…
Browse files Browse the repository at this point in the history
…3428)

Signed-off-by: Austin Abro <[email protected]>
  • Loading branch information
AustinAbro321 authored Jan 23, 2025
1 parent a6b7093 commit 2cbd0f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/cmd/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ func newDevInspectDefinitionCommand(v *viper.Viper) *cobra.Command {

func (o *devInspectDefinitionOptions) run(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
v := getViper()
o.setVariables = helpers.TransformAndMergeMap(
v.GetStringMapString(VPkgCreateSet), o.setVariables, strings.ToUpper)
pkg, err := layout2.LoadPackage(ctx, setBaseDirectory(args), o.flavor, o.setVariables)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion src/test/e2e/00_use_cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestUseCLI(t *testing.T) {
t.Parallel()
pathToPackage := filepath.Join("src", "test", "packages", "00-dev-inspect-definition")

stdOut, _, err := e2e.Zarf(t, "dev", "inspect", "definition", pathToPackage, "--flavor=ice-cream", "--set=MY_VAR=worked-as-expected", "--architecture=amd64")
stdOut, _, err := e2e.Zarf(t, "dev", "inspect", "definition", pathToPackage, "--flavor=ice-cream", "--set=my_var=worked-as-expected", "--architecture=amd64")
require.NoError(t, err)
b, err := os.ReadFile(filepath.Join(pathToPackage, "expected-zarf.yaml"))
require.NoError(t, err)
Expand Down

0 comments on commit 2cbd0f1

Please sign in to comment.