Skip to content

Commit 5f6760a

Browse files
committed
fix: cli output trunc
Signed-off-by: Peefy <[email protected]>
1 parent aa4a8b8 commit 5f6760a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/options/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ func (o *RunOptions) writeResult(result *kcl.KCLResultList) error {
306306
return err
307307
}
308308
} else {
309-
file, err := os.OpenFile(o.Output, os.O_CREATE|os.O_RDWR, 0744)
309+
file, err := os.OpenFile(o.Output, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0744)
310310
if err != nil {
311311
return err
312312
}

0 commit comments

Comments
 (0)