Does not work in WSL
mdashlw opened this issue · 0 comments
mdashlw commented
It tries to use the Windows binary when run in WSL instead of the Linux binaries
> clipboardy = await import('clipboardy')
[Module: null prototype] {
default: {
write: [AsyncFunction (anonymous)],
read: [AsyncFunction (anonymous)],
writeSync: [Function (anonymous)],
readSync: [Function (anonymous)]
}
}
> clipboardy.default.writeSync('test')
Uncaught:
Error: Command failed with exit code 1: /home/mdashlw/.../node_modules/clipboardy/fallbacks/windows/clipboard_x86_64.exe --copy
<3>WSL (619) ERROR: UtilAcceptVsock:250: accept4 failed 110
at makeError (file:///home/mdashlw/.../node_modules/execa/lib/error.js:60:11)
at execaSync (file:///home/mdashlw/.../node_modules/execa/index.js:201:17)
at Object.copySync (file:///home/mdashlw/.../node_modules/clipboardy/lib/windows.js:19:23)
at clipboard.writeSync (file:///home/mdashlw/.../node_modules/clipboardy/index.js:54:14) {
shortMessage: 'Command failed with exit code 1: /home/mdashlw/.../node_modules/clipboardy/fallbacks/windows/clipboard_x86_64.exe --copy',
command: '/home/mdashlw/.../node_modules/clipboardy/fallbacks/windows/clipboard_x86_64.exe --copy',
escapedCommand: '"/home/mdashlw/.../node_modules/clipboardy/fallbacks/windows/clipboard_x86_64.exe" --copy',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: '',
stderr: '<3>WSL (619) ERROR: UtilAcceptVsock:250: accept4 failed 110',
cwd: '/home/mdashlw/...',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}