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

cmd.exe is expected to be available on the PATH in WSL #186

Closed
oliversalzburg opened this issue Jul 24, 2020 · 1 comment · Fixed by #195
Closed

cmd.exe is expected to be available on the PATH in WSL #186

oliversalzburg opened this issue Jul 24, 2020 · 1 comment · Fixed by #195

Comments

@oliversalzburg
Copy link

When I try to use open from WSL, it fails to open URLs

$ npx open-cli http://google.com
npx: installed 82 in 9.186s
events.js:291
      throw er; // Unhandled 'error' event
      ^

Error: spawn cmd.exe ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn cmd.exe',
  path: 'cmd.exe',
  spawnargs: [ '/s', '/c', 'start', '""', '/b', 'http://google.com' ]
}

I'm assuming this is because there is no browser or it's otherwise WSL related.

Possibly related: #56, #173
Related: open-wc/open-wc#1763

@oliversalzburg
Copy link
Author

I misread the error. This fails because open expects cmd.exe to be available through the PATH, I guess. On my system I have appending of the Windows PATH disabled.

Given how this is a valid configuration, maybe something can be done to handle it?

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 a pull request may close this issue.

1 participant