Skip to content

Commit

Permalink
bugfix: no such file or directory for compile (#229)
Browse files Browse the repository at this point in the history
fix: #223

when compile KCL project, will default output to `ci-test/std.golden.yaml`, when compile single KCL file, should default output to `stdout`.
  • Loading branch information
howieyuen committed Feb 1, 2023
1 parent bc59552 commit 9d43e0a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/kusionctl/cmd/compile/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ func (o *CompileOptions) PreSet(preCheck func(cur string) bool) {
curDir, _ = os.Getwd()
}
if ok := preCheck(curDir); !ok {
if o.Output == "" {
o.Output = Stdout
}
return
}

Expand Down

0 comments on commit 9d43e0a

Please sign in to comment.