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

wsl --exec <command> doesnt work #284

Closed
Sakooooo opened this issue Sep 4, 2023 · 3 comments
Closed

wsl --exec <command> doesnt work #284

Sakooooo opened this issue Sep 4, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Sakooooo
Copy link

Sakooooo commented Sep 4, 2023

Bug description

when trying to run wsl --exec with nixos as my default distro it errors with

<3>WSL (16121) ERROR: CreateProcessEntryCommon:577: execvpe emacs failed 2
<3>WSL (16121) ERROR: CreateProcessEntryCommon:586: Create process not expected to return

To Reproduce

Steps to reproduce the behavior:

  1. Run wsl --exec <command>
  2. returns <3>WSL (16121) ERROR: CreateProcessEntryCommon:577: execvpe emacs failed 2

Expected behavior

it should execute normally

Logs

 ~ wsl --exec emacs
<3>WSL (16121) ERROR: CreateProcessEntryCommon:577: execvpe emacs failed 2
<3>WSL (16121) ERROR: CreateProcessEntryCommon:586: Create process not expected to return
~
@Sakooooo Sakooooo added the bug Something isn't working label Sep 4, 2023
@Sakooooo
Copy link
Author

Sakooooo commented Sep 4, 2023

its supposed to be wsl <command> not wsl --exec <command> sorry :P

@Sakooooo Sakooooo closed this as completed Sep 4, 2023
@nzbr
Copy link
Member

nzbr commented Sep 9, 2023

wsl --exec actually launches the command without a login shell. Because all of the NixOS specific magic (currently, that's gonna change) happens in the login shell of the root user, only wsl <command> works properly with NixOS right now

@Sakooooo
Copy link
Author

Sakooooo commented Sep 9, 2023

alright thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants