mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-05 08:33:10 +00:00
fix: tui: Handle Clipboard.copy errors properly (#3685)
This commit is contained in:
@@ -76,7 +76,7 @@ export namespace Clipboard {
|
||||
const proc = Bun.spawn(["wl-copy"], { stdin: "pipe", stdout: "ignore", stderr: "ignore" })
|
||||
proc.stdin.write(text)
|
||||
proc.stdin.end()
|
||||
await proc.exited.catch(() => {})
|
||||
await proc.exited
|
||||
}
|
||||
}
|
||||
if (Bun.which("xclip")) {
|
||||
@@ -117,7 +117,7 @@ export namespace Clipboard {
|
||||
|
||||
console.log("clipboard: no native support")
|
||||
return async (text: string) => {
|
||||
await clipboardy.write(text).catch(() => {})
|
||||
await clipboardy.write(text)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user