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

--clipboard option fails on Windows #57

Closed
Hexxeh opened this issue Aug 20, 2018 · 6 comments
Closed

--clipboard option fails on Windows #57

Hexxeh opened this issue Aug 20, 2018 · 6 comments

Comments

@Hexxeh
Copy link

Hexxeh commented Aug 20, 2018

clipboardy, the dependency used for clipboard support, bundles native binaries to write to the clipboard. Unfortunately, these are lost during the webpacking process this tool uses. This means that running envinfo --clipboard fails at runtime on Windows.

@tabrindle
Copy link
Owner

😭 Thank you so much for reporting and finding this issue! 2 questions:

  1. Does this prevent envinfo from printing the info?
  2. Is there an alternative to using native binaries for clipboard support on node/windows?

@Hexxeh
Copy link
Author

Hexxeh commented Aug 21, 2018

  1. Yes
  2. Older versions of clipboardy used a non-native way of doing this, so pinning an older version might be one approach. They switched because of issues with large amounts of data in clipboard, but that isn't such concern here.

@tabrindle
Copy link
Owner

  1. Crap.
  2. Awesome.

Would you be willing to PR/test that version change?

@Hexxeh
Copy link
Author

Hexxeh commented Aug 21, 2018

The old version of clipboardy has bad Unicode support, not sure if that's an issue for this particular dependency.

The real fix would probably be to publish a non-webpacked version and include a dependency on clipboardy. Might not be appropriate for some of the ways this library is being distributed though.

@tabrindle
Copy link
Owner

envinfo is most useful when used via npx - and webpack enables a much smaller footprint and shorter download time. In my benchmarks before publishing it, it reduced type from initial command to report by several seconds.

An alternate solution might be to use npx to call clipboardy - especially since it's not always used, and only a problem on windows.

@tabrindle
Copy link
Owner

Working on moving the dependency to npx to be installed correctly without being in the main envinfo bundle.

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

2 participants