Skip to content

Commit

Permalink
Fix order of operations in Setup()
Browse files Browse the repository at this point in the history
  • Loading branch information
peb-adr committed Dec 6, 2023
1 parent 8120521 commit 5a41edd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ func Setup(dir string, force bool, tplDirName *string, configFileNames *[]string
return fmt.Errorf("creating new YML config object: %w", err)
}

// Create deployment file(s)
if err := config.CreateDeploymentFilesFromTree(dir, force, tplDirName, cfg); err != nil {
return fmt.Errorf("creating YAML file at %q: %w", dir, err)
}

// Create secrets directory
secrDir := path.Join(dir, SecretsDirName)
if err := os.MkdirAll(secrDir, subDirPerms); err != nil {
Expand All @@ -128,6 +123,11 @@ func Setup(dir string, force bool, tplDirName *string, configFileNames *[]string
return fmt.Errorf("creating admin file at %q: %w", dir, err)
}

// Create deployment file(s)
if err := config.CreateDeploymentFilesFromTree(dir, force, tplDirName, cfg); err != nil {
return fmt.Errorf("creating YAML file at %q: %w", dir, err)
}

return nil
}

Expand Down

0 comments on commit 5a41edd

Please sign in to comment.