这是indexloc提供的服务,不要输入任何密码
Skip to content

turbo login fails on WSL2 #1196

@myandrienko

Description

@myandrienko

What version of Turborepo are you using?

1.2.5

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Linux

Describe the Bug

Turbo CLI uses xdg-open to authenticate user in browser on Linux. WSL2 distribution of Ubuntu comes without xdg-open, so turbo login fails:

ERROR  failed to open https://vercel.com/turborepo/token?redirect_uri=http://127.0.0.1:9789: exec: "xdg-open": executable file not found in $PATH

Expected Behavior

WSL2 distributions come with a utility called wslview which open a browser on the host OS. Turbo CLI should detect if wslview is available and use it instead of xdg-open.

To Reproduce

  1. Enable WSL2 on Windows.
  2. Run turbo login in any turborepo root from WSL2.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions