Skip to content

Commit

Permalink
Merge pull request #160 from kcl-lang/fix-cli-output-trunc
Browse files Browse the repository at this point in the history
fix: cli output trunc
  • Loading branch information
Peefy authored Nov 5, 2024
2 parents aa4a8b8 + 5f6760a commit 84787d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/options/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func (o *RunOptions) writeResult(result *kcl.KCLResultList) error {
return err
}
} else {
file, err := os.OpenFile(o.Output, os.O_CREATE|os.O_RDWR, 0744)
file, err := os.OpenFile(o.Output, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0744)
if err != nil {
return err
}
Expand Down

0 comments on commit 84787d9

Please sign in to comment.