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

Include more useful message when copy_to_clipboard fails #90

Merged
merged 1 commit into from Nov 21, 2020

Conversation

tpoliaw
Copy link
Contributor

@tpoliaw tpoliaw commented Nov 19, 2020

Potential fix for panic when xclip is not installed. I've not got access to macos so tested on linux only.

If the clipboard application used was not available, the-way would panic
with an unclear message ("No such file or directory (os error 2)"). This
wraps the OS Error in a ClipboardError and provides some context as to what
failed.

Fixes out-of-cheese-error#89
@Ninjani Ninjani linked an issue Nov 21, 2020 that may be closed by this pull request
@Ninjani
Copy link
Member

Ninjani commented Nov 21, 2020

Tested on macos and works as well. This way of doing it with command and args is also much cleaner, thanks!

@Ninjani Ninjani merged commit 7ac0357 into out-of-cheese-error:master Nov 21, 2020
@tpoliaw tpoliaw deleted the copy_panic branch November 23, 2020 10:46
@tpoliaw tpoliaw restored the copy_panic branch September 17, 2021 18:38
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.

Panic if xclip is not installed
2 participants