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

fix(gatsby-cli): Fix --clipboard on Windows #13212

Merged
merged 8 commits into from
Apr 15, 2019
Merged

Conversation

sidharthachatterjee
Copy link
Contributor

@sidharthachatterjee sidharthachatterjee commented Apr 8, 2019

gatsby info --clipboard has issues on Windows as documented in #11496

envinfo dropped clipboard support in v6 and removed clipboardy so using it directly here. Not sure if it will fix #11496 since no behaviour should've changed

Todo

Related

tabrindle/envinfo#83 and #11496

Test

npm i gatsby-cli@clipboardy

Other Changes

  • The underline to the sections is gone since we log to console ourselves now (not a big deal in my opinion)
  • Added duplicates and showNotFound options (useful for debugging and cra uses them too)

Before

Screenshot 2019-04-08 18 14 21

After

Screenshot 2019-04-08 18 14 48
(Notice the Not Found for Firefox)

@saranshkataria
Copy link
Contributor

saranshkataria commented Apr 10, 2019

Though this gives a better output, node version is still missing here:
Also, browsers are missing too, though not sure if that matters

System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
Binaries:
Node: Not Found
Yarn: 1.12.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 2.7.15
Browsers:
Edge: 44.17763.1.0
npmPackages:
gatsby: ^2.3.16 => 2.3.16
gatsby-cli: ^2.5.5-clipboardy.1 => 2.5.5-clipboardy.1
gatsby-image: ^2.0.37 => 2.0.37
gatsby-plugin-manifest: ^2.0.28 => 2.0.28
gatsby-plugin-offline: ^2.0.25 => 2.0.25
gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12
gatsby-plugin-sharp: ^2.0.32 => 2.0.32
gatsby-source-filesystem: ^2.0.29 => 2.0.29
gatsby-transformer-sharp: ^2.1.17 => 2.1.17

@sidharthachatterjee
Copy link
Contributor Author

@saranshkataria Node version and browsers not showing up seems strange! Can you open an issue in https://github.com/tabrindle/envinfo for this?

Does the clipboard stuff work by any chance?

@saranshkataria
Copy link
Contributor

@sidharthachatterjee this was the output from clipboardy (I installed gatsby-cli@clipboardy globally and ran gatsby info --clipboard)

@sidharthachatterjee
Copy link
Contributor Author

@saranshkataria Oh, alright! I meant to ask if gatsby info --clipboard correctly copied over to the clipboard or not?

@sidharthachatterjee
Copy link
Contributor Author

Potentially relevant/useful stack trace at #13274 (comment)

@saranshkataria
Copy link
Contributor

The above output was copied to the clipboard correctly. Though it is relatively less information than the sample you provided, but it is atleast copying it to the clipboard which was not happening before.

@wardpeet
Copy link
Contributor

wardpeet commented Apr 11, 2019

@sidharthachatterjee same here, funny that edge is detected but nothing else 😄

  System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  Binaries:
    Node: Not Found
    Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 2.7.15 - C:\Users\WardPeeters\.windows-build-tools\python27\python.EXE
  Browsers:
    Edge: 44.17763.1.0
  npmPackages:
    gatsby: ^2.3.3 => 2.3.3
    gatsby-image: ^2.0.35 => 2.0.35
    gatsby-plugin-manifest: ^2.0.25 => 2.0.25
    gatsby-plugin-offline: ^2.0.25 => 2.0.25
    gatsby-plugin-react-helmet: ^3.0.11 => 3.0.11
    gatsby-plugin-sharp: ^2.0.32 => 2.0.32
    gatsby-source-filesystem: ^2.0.28 => 2.0.28
    gatsby-transformer-sharp: ^2.1.17 => 2.1.17

@sidharthachatterjee
Copy link
Contributor Author

Just reverted the envinfo config to what it was before (I'd added duplicates and showNotFound options) and published a new version.

@saranshkataria @wardpeet Can you try npm i gatsby-cli@clipboardy again and confirm that --clipboard works correctly on Windows?

@sidharthachatterjee sidharthachatterjee changed the title [WIP] chore(gatsby-cli): Fix --clipboard on Windows chore(gatsby-cli): Fix --clipboard on Windows Apr 15, 2019
@pieh pieh removed the status: WIP label Apr 15, 2019
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

Nice, thanks @sidharthachatterjee! 🌮

@pieh pieh changed the title chore(gatsby-cli): Fix --clipboard on Windows fix(gatsby-cli): Fix --clipboard on Windows Apr 15, 2019
@pieh pieh merged commit a7383c5 into master Apr 15, 2019
@pieh pieh deleted the fix/clipboard-on-windows branch April 15, 2019 15:02
@wardpeet
Copy link
Contributor

  System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  Binaries:
    Node: 10.15.3 - ~\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
    Yarn: 1.15.2 - ~\scoop\apps\yarn\current\Yarn\bin\yarn.CMD
    npm: 6.9.0 - ~\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
  Languages:
    Python: 2.7.15 - C:\Users\<user>\.windows-build-tools\python27\python.EXE
  Browsers:
    Edge: 44.17763.1.0
  npmPackages:
    gatsby: ^2.3.23 => 2.3.23 

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.

gatsby info --clipboard gives errors on Windows 10
4 participants