mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tui: prevent clipboard operations from throwing errors on process exit
This commit is contained in:
parent
91d01fd4cc
commit
68050ab802
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
await proc.exited.catch(() => {})
|
||||
}
|
||||
}
|
||||
if (Bun.which("xclip")) {
|
||||
|
|
@ -89,7 +89,7 @@ export namespace Clipboard {
|
|||
})
|
||||
proc.stdin.write(text)
|
||||
proc.stdin.end()
|
||||
await proc.exited
|
||||
await proc.exited.catch(() => {})
|
||||
}
|
||||
}
|
||||
if (Bun.which("xsel")) {
|
||||
|
|
@ -102,7 +102,7 @@ export namespace Clipboard {
|
|||
})
|
||||
proc.stdin.write(text)
|
||||
proc.stdin.end()
|
||||
await proc.exited
|
||||
await proc.exited.catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue