Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work in WSL #97

Open
mdashlw opened this issue Apr 28, 2024 · 0 comments
Open

Does not work in WSL #97

mdashlw opened this issue Apr 28, 2024 · 0 comments

Comments

@mdashlw
Copy link

mdashlw commented Apr 28, 2024

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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant