mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 07:16:33 -04:00
Fix #4822: let xclip exit
This commit is contained in:
parent
b75db50a5f
commit
8dd6e14550
|
|
@ -465,7 +465,11 @@ export async function clipboard(
|
|||
} else if (action === "set") {
|
||||
const required_version = "0.1.7"
|
||||
if (await nativegate(required_version, false)) {
|
||||
const result = await run(`${clipcmd} -i`, str)
|
||||
const nullDevice =
|
||||
(await browserBg.runtime.getPlatformInfo()).os === "win"
|
||||
? "NUL"
|
||||
: "/dev/null"
|
||||
const result = await run(`${clipcmd} -i >${nullDevice} 2>&1`, str)
|
||||
if (result.code !== 0)
|
||||
throw new Error(
|
||||
`External command failed with code ${result.code}: ${clipcmd}`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue