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

Use clipboardy #130

Merged
merged 1 commit into from
Mar 13, 2017
Merged

Use clipboardy #130

merged 1 commit into from
Mar 13, 2017

Conversation

floatdrop
Copy link
Contributor

@floatdrop floatdrop commented Mar 11, 2017

It uses xsel which is more reliable and bundled with package to get things working on linux out of the box.

@@ -1,5 +1,5 @@
// Packages
const {copy} = require('copy-paste')
const {write: copy} = require('clipboardy')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clipboardy.write returns a promise already so the promisify call below is unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@AndyBitz
Copy link
Contributor

This will fail on bash on windows if xsel is installed.

image

@floatdrop
Copy link
Contributor Author

@AndyBitz can you share the setup? Is it cygwin? What does xsel returns, if you launch it manually?

@AndyBitz
Copy link
Contributor

AndyBitz commented Mar 12, 2017

I'm using bash on ubuntu on windows which is a linux subsystem on windows.

xsel returns
xsel: Can't open display: (null)
: Success

@floatdrop
Copy link
Contributor Author

@AndyBitz is calling DISPLAY=:0 xsel works for you?

@AndyBitz
Copy link
Contributor

@floatdrop returns
xsel: Can't open display: (null)
: Connection refused

@floatdrop
Copy link
Contributor Author

@AndyBitz patch to execa is ready, but can you check the exit code of xsel – is it non-zero?

@AndyBitz
Copy link
Contributor

@floatdrop yes it is 1

@floatdrop
Copy link
Contributor Author

floatdrop commented Mar 13, 2017

@AndyBitz patch released as 0.6.1 – can you confirm, that issue is gone?

@AndyBitz
Copy link
Contributor

@floatdrop Perfect! Everything works fine!

@leo leo merged commit 114e0a9 into vercel:master Mar 13, 2017
@leo
Copy link
Contributor

leo commented Mar 13, 2017

Sweet! 😏 Thx.

@floatdrop floatdrop deleted the use-clipboardy branch March 14, 2017 04:46
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

Successfully merging this pull request may close these issues.

None yet

4 participants