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

error 0x80070002 when launching most commands against WSL2 #7817

Closed
danielkcz opened this issue Oct 3, 2020 · 4 comments
Closed

error 0x80070002 when launching most commands against WSL2 #7817

danielkcz opened this issue Oct 3, 2020 · 4 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@danielkcz
Copy link

Environment

Windows build number: 10.0.19041.0
Windows Terminal version (if applicable): 1.3.2651.0
PowerShell: 7.0.1

Steps to reproduce

Running wt top within Powershell while having WSL Ubuntu-20.04 as the default profile.
Specifying -p "Ubuntu-20.04 yields the same result.
Tried several other commands that work when executed manually from bash.

Expected behavior

I want to run wt yarn (among other commands in split panes) to set up my environment for development easily.

Actual behavior

The new terminal opens with the correct profile and only shows the error

image
image
image

I have a feeling that WT is trying to run these commands too soon before WSL is properly initialized.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 3, 2020
@zadjii-msft
Copy link
Member

Yea, that's not exactly how the commandline parameter to wt works. When you pass in foo as the commandline, it doesn't append it to the profile's commandline, it overrides the commandline of the profile. So in your examples, above, the Terminal is literally looking for top.exe, pwd.exe, yarn.exe, when what you really want is wsl -d Ubuntu-20.04 top.

"Add support for appending a commandline to a profile's commandline" is being tracked over in /dup #5528

@ghost
Copy link

ghost commented Oct 5, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Oct 5, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 5, 2020
@danielkcz
Copy link
Author

Wait, how is wsl going to help me here? I mean sure it will run top inside Powershell, but that's not what I am looking for. I want to set up a one-liner that would line launch a new WT window with several split panes and run some command in each.

I guess I will follow #5528 as that indeed seems the same problem I am facing. Thanks!

@zadjii-msft
Copy link
Member

When you're running a WSL profile, the commandline is technically wsl.exe -d <the distro's name>. So the commandline for the Ubuntu-20.04 profile is wsl.exe -d Ubuntu-20.04. So you definitely could get what you're looking for with the wt parameters, it'll just be V E R B O S E

wt wsl -d Ubuntu-20.04 top ; sp wsl -d Ubuntu-20.04 yarn ; wsl -d Ubuntu-20.04 pwd

(using sp as the short form of split-pane, introduced in #6576)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants