Skip to content

Commit 68050ab

Browse files
committed
tui: prevent clipboard operations from throwing errors on process exit
1 parent 91d01fd commit 68050ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/opencode/src/cli/cmd/tui/util/clipboard.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export namespace Clipboard {
7676
const proc = Bun.spawn(["wl-copy"], { stdin: "pipe", stdout: "ignore", stderr: "ignore" })
7777
proc.stdin.write(text)
7878
proc.stdin.end()
79-
await proc.exited
79+
await proc.exited.catch(() => {})
8080
}
8181
}
8282
if (Bun.which("xclip")) {
@@ -89,7 +89,7 @@ export namespace Clipboard {
8989
})
9090
proc.stdin.write(text)
9191
proc.stdin.end()
92-
await proc.exited
92+
await proc.exited.catch(() => {})
9393
}
9494
}
9595
if (Bun.which("xsel")) {
@@ -102,7 +102,7 @@ export namespace Clipboard {
102102
})
103103
proc.stdin.write(text)
104104
proc.stdin.end()
105-
await proc.exited
105+
await proc.exited.catch(() => {})
106106
}
107107
}
108108
}

0 commit comments

Comments
 (0)