Skip to content

Commit

Permalink
fix: cli output trunc
Browse files Browse the repository at this point in the history
Signed-off-by: Peefy <xpf6677@163.com>
  • Loading branch information
Peefy committed Nov 5, 2024
1 parent aa4a8b8 commit 5f6760a
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 5f6760a

Please sign in to comment.