Skip to content

Commit 31457b7

Browse files
committed
fix: handle error when printing path to stdout
1 parent 3499a3a commit 31457b7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

internal/app/app.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ func Run(cfg Config) mo.Result[string] {
4646
}
4747

4848
if cfg.Flags.PrintPath {
49-
fmt.Fprintln(os.Stdout, tuiResult.Path)
49+
_, err = fmt.Fprintln(os.Stdout, tuiResult.Path)
50+
if err != nil {
51+
return mo.Err[string](err)
52+
}
5053
return mo.Ok(tuiResult.Path)
5154
}
5255

0 commit comments

Comments
 (0)