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

Allow twitch-cli to open default browser in Windows when run inside WSL #58

Merged
merged 4 commits into from
Apr 16, 2021

Conversation

3ventic
Copy link
Contributor

@3ventic 3ventic commented Apr 16, 2021

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem/Feature

twitch token -u does not open the browser from WSL. Call Windows to open the browser, when inside WSL.

Description of Changes:

  • Split openBrowser's linux logic to WSL and "real" Linux specific commands
  • Add errcheck to openBrowser and print the URL in the console, if opening the browser fails

Checklist

  • My code follows the Contribution Guide
  • I have self-reviewed the changes being requested
  • I have made comments on pieces of code that may be difficult to understand for other editors
  • I have updated the documentation (if applicable)

Copy link
Contributor

@lleadbet lleadbet left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for fixing this.

@lleadbet lleadbet merged commit 233fa60 into twitchdev:main Apr 16, 2021
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.

2 participants