Skip to content

Commit

Permalink
bugfix: preset o.Settings and o.Output separately (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
howieyuen committed Dec 28, 2022
1 parent 1b87acb commit 8fd2757
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/kusionctl/cmd/compile/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ func (o *CompileOptions) PreSet(preCheck func(cur string) bool) {
return
}

if len(o.Settings) == 0 && o.Output == "" && len(o.Filenames) == 0 {
if len(o.Settings) == 0 {
o.Settings = []string{filepath.Join(projectstack.CiTestDir, projectstack.SettingsFile), projectstack.KclFile}
}

if o.Output == "" {
o.Output = filepath.Join(projectstack.CiTestDir, projectstack.StdoutGoldenFile)
}
}

0 comments on commit 8fd2757

Please sign in to comment.