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

Tasks always adds -e for wsl.exe, but should be Windows build dependent. #67855

Closed
alexr00 opened this issue Feb 4, 2019 · 2 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues verified Verification succeeded
Milestone

Comments

@alexr00
Copy link
Member

alexr00 commented Feb 4, 2019

See #63741.
Turns out that wsl.exe used to wrap bash.exe, and in more recent builds the command line argument options changed.

@alexr00 alexr00 self-assigned this Feb 4, 2019
@alexr00 alexr00 added the tasks Task system issues label Feb 4, 2019
@alexr00 alexr00 added this to the February 2019 milestone Feb 4, 2019
@alexr00 alexr00 added the bug Issue identified by VS Code Team member as probable bug label Feb 4, 2019
@RMacfarlane RMacfarlane added the verification-steps-needed Steps to verify are needed for verification label Feb 27, 2019
@alexr00
Copy link
Member Author

alexr00 commented Feb 27, 2019

You'll need to have multiple versions of Windows to really verify this. Since the behavior shouldn't have changed for the latest regular Windows release just making sure that it still works there should be good. Set:
"terminal.integrated.shell.windows": "wsl.exe",

And try to run this task:

		{
			"type": "shell",
			"command": "echo hello",
			"label": "My Task",
			"problemMatcher": []
		}

Verify that the task executes and you can see hello get echoed.

@alexr00 alexr00 removed the verification-steps-needed Steps to verify are needed for verification label Feb 27, 2019
@RMacfarlane RMacfarlane added the verified Verification succeeded label Feb 28, 2019
@davidwin
Copy link

I can add that on Windows 10 16299, the verification as described above fails. If I set "terminal.integrated.shell.windows": "wsl.exe", Code tries to launch
wsl.exe -c "echo hello"
, which fails with error
/bin/bash: - : invalid option.

Specifying wsl.exe as the shell in the tasks.json file results in Code trying to launch
wsl.exe "echo hello"
, which fails with error
/bin/bash: echo hello: command not found

A recent Windows version works as expected in both cases.

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants