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 coder login for WSL #1

Merged
merged 1 commit into from
Sep 22, 2021
Merged

allow coder login for WSL #1

merged 1 commit into from
Sep 22, 2021

Conversation

arminaaki
Copy link
Owner

@arminaaki arminaaki commented Sep 22, 2021

Issue

coder login fails to open user's browser while running from Windows Subsystem for Linux.

$ coder login <coder_url>
/usr/bin/xdg-open: 869: www-browser: not found
/usr/bin/xdg-open: 869: links2: not found
/usr/bin/xdg-open: 869: elinks: not found
/usr/bin/xdg-open: 869: links: not found
/usr/bin/xdg-open: 869: lynx: not found
/usr/bin/xdg-open: 869: w3m: not found

Changes

  • allow coder login to work while running from WSL.
  • Detect if running in WSL by identifying microsoft in /proc/version file.
$ cat /proc/version
Linux version ....-Microsoft (Microsoft@Microsoft.com) (gcc version ... (GCC) ) #...-Microsoft ....

@arminaaki arminaaki merged commit 2666ce0 into main Sep 22, 2021
@delete-merged-branch delete-merged-branch bot deleted the aakhbari/wsl branch September 22, 2021 03:32
arminaaki added a commit that referenced this pull request Oct 19, 2021
* allow coder login for WSL (#1)

Co-authored-by: Armin <arminaaki@users.noreply.github.com>

* use constants for runtime.GOOS

* update lint errors

Co-authored-by: Armin <arminaaki@users.noreply.github.com>
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.

1 participant