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

VSCode call WSL's make #63741

Closed
ghost opened this issue Nov 25, 2018 · 18 comments
Closed

VSCode call WSL's make #63741

ghost opened this issue Nov 25, 2018 · 18 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues verified Verification succeeded WSL Issue when using WSL

Comments

@ghost
Copy link

ghost commented Nov 25, 2018

When I configured dev environment at WSL, I trying to using tasks.json to call WSL side's make, but, the terminal say: bash: 'make' not found.
My WSL system is Ubuntu 18.04, use zsh(oh-my-zsh)

@vscodebot
Copy link

vscodebot bot commented Nov 25, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the terminal Integrated terminal issues label Nov 25, 2018
@ghost
Copy link
Author

ghost commented Nov 25, 2018

VSCode can add support for WSL's side build tool? Like make,cmake.

@alexr00 alexr00 self-assigned this Nov 26, 2018
@alexr00 alexr00 added info-needed Issue requires more information from poster and removed terminal Integrated terminal issues labels Dec 11, 2018
@alexr00
Copy link
Member

alexr00 commented Dec 11, 2018

What is the output of make --version in WSL?

@ghost
Copy link
Author

ghost commented Dec 11, 2018

bash: make: command not found.

@ghost
Copy link
Author

ghost commented Dec 11, 2018

When I use tasks to call it

@alexr00
Copy link
Member

alexr00 commented Dec 11, 2018

What is the output of make --version in WSL when you run it without tasks though?

@ghost
Copy link
Author

ghost commented Dec 11, 2018

GNU Make 4.2.1

@alexr00
Copy link
Member

alexr00 commented Dec 11, 2018

What do you have terminal.integrated.shell.windows set to in your settings? Are you setting the terminal exectuable to zsh there, or in your tasks.json?

@ghost
Copy link
Author

ghost commented Dec 11, 2018

I set that, and i set command at tasks.json.terminal.intergrated.shell.windowsI set to wsl.exe.

@alexr00
Copy link
Member

alexr00 commented Dec 12, 2018

It looks like we don't do the special handling for wsl.exe that we do for bash.exe. I know bash.exe is no longer recommended for WSL, but could you try setting terminal.integrated.shell.windows to bash.exe? I will fix it for wsl.exe, but using bash.exe for now will get you unstuck.

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug tasks Task system issues WSL Issue when using WSL and removed info-needed Issue requires more information from poster labels Dec 12, 2018
@alexr00 alexr00 added this to the December 2018 milestone Dec 12, 2018
@ghost
Copy link
Author

ghost commented Dec 12, 2018

Ok,Thanks for your answer.

@alexr00
Copy link
Member

alexr00 commented Dec 12, 2018

Verification steps for later:
On Windows, setup WSL.
In settings: "terminal.integrated.shell.windows": "wsl.exe",
Run a task. Example:

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

The task should run and not have the message: /bin/bash: /d: No such file or directory
The terminal process terminated with exit code: 127

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 26, 2019
@chrmarti
Copy link
Contributor

chrmarti commented Feb 1, 2019

@alexr00 There is still an error:
image

@chrmarti chrmarti reopened this Feb 1, 2019
@chrmarti chrmarti added the verification-found Issue verification failed label Feb 1, 2019
@alexr00
Copy link
Member

alexr00 commented Feb 1, 2019

@chrmarti, I can't reproduce this. What version of Windows are you on?
I think this is a different bug. In your issue wsl.exe can't handle -, but in the original bug it couldn't handle /d.

@chrmarti
Copy link
Contributor

chrmarti commented Feb 1, 2019

@alexr00 This is 10.0.17134.

@alexr00
Copy link
Member

alexr00 commented Feb 4, 2019

@chrmarti can you try running wsl.exe -e echo hello from cmd.exe? Can you paste the output of running wsl.exe --help from cmd.exe?

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Feb 4, 2019
@chrmarti
Copy link
Contributor

chrmarti commented Feb 4, 2019

Microsoft Windows [Version 10.0.17134.523]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\chrmarti>wsl.exe -e echo hello
/bin/bash: - : invalid option

C:\Users\chrmarti>wsl.exe --help
/bin/bash: --: invalid option
Usage:  /bin/bash [GNU long option] [option] ...
        /bin/bash [GNU long option] [option] script-file ...
GNU long options:
        --debug
        --debugger
        --dump-po-strings
        --dump-strings
        --help
        --init-file
        --login
        --noediting
        --noprofile
        --norc
        --posix
        --rcfile
        --restricted
        --verbose
        --version
Shell options:
        -ilrsD or -c command or -O shopt_option         (invocation only)
        -abefhkmnptuvxBCHP or -o option

@alexr00
Copy link
Member

alexr00 commented Feb 4, 2019

Thank you! Looks like there would need to be a Windows version check since the build that you're on appears to just wrap bash.exe and the more recent build that I'm on has different argument options:

C:\Users\alros\repos\vscode\vscode>wsl.exe --help
Usage: wsl.exe [option] ...
Options:
    -d, --distribution <DistributionName>
        Launch the specified distribition.

    -e, --exec <CommandLine>
        Execute the specified Linux command. The remainder of the arguments are
        used as the command line to execute.

    -u, --user <UserName>
        Run as the specified user.

    --help
        Display this usage information.

    --
        Stop parsing arguments and pass the remainder to the Linux process.

This is a different problem, so I opened a new issue: #67855

@alexr00 alexr00 closed this as completed Feb 4, 2019
@alexr00 alexr00 added verified Verification succeeded and removed info-needed Issue requires more information from poster verification-found Issue verification failed labels Feb 4, 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 WSL Issue when using WSL
Projects
None yet
Development

No branches or pull requests

4 participants
@dbaeumer @chrmarti @alexr00 and others