Skip to content

Commit

Permalink
Don't try to copy to clipboard on linux
Browse files Browse the repository at this point in the history
It neither works, nor does it throw
  • Loading branch information
leo committed Mar 8, 2017
1 parent f0fd992 commit 9ec86c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/listening.js
Expand Up @@ -44,7 +44,7 @@ module.exports = coroutine(function * (server, current, inUse) {
message += `\n- ${chalk.bold('On Your Network: ')} ${url}`
} catch (err) {}

if (isTTY) {
if (isTTY && process.platform !== 'linux') {
try {
yield copyAsync(localURL)
message += `\n\n${chalk.grey('Copied local address to clipboard!')}`
Expand Down

5 comments on commit 9ec86c4

@oskarrough
Copy link

Choose a reason for hiding this comment

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

fwiw it worked fine on my Fedora 25.

@leo
Copy link
Contributor Author

@leo leo commented on 9ec86c4 Mar 8, 2017

Choose a reason for hiding this comment

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

@oskarrough What does process.platform return on your device inside node?

@disquisition
Copy link
Contributor

Choose a reason for hiding this comment

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

See this comment; if you have xclip installed everything works fine. I have a PR out to fix the underlying bug in node-copy-paste (xavi-/node-copy-paste#53) but until that's merged it will fail silently for some Linux users (and take down serve with it).

@oskarrough
Copy link

Choose a reason for hiding this comment

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

@leo returns linux.

@disquisition ah, that's it. I have xclip installed.

Hope the feature will come back one day!

@leo
Copy link
Contributor Author

@leo leo commented on 9ec86c4 Mar 9, 2017

Choose a reason for hiding this comment

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

Looking forward to the PR getting merged!

Please sign in to comment.