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

Mismatch between tasks.json "type" default value from schema and reality #91553

Closed
Gama11 opened this issue Feb 26, 2020 · 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

@Gama11
Copy link
Contributor

Gama11 commented Feb 26, 2020

Version: 1.42.1 (user setup)
Commit: c47d83b
Date: 2020-02-11T14:45:59.656Z
Electron: 6.1.6
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18363

(also tested with Insider's build b0be067)


According to the tasks.json schema / completion details, tasks use "type": "shell" by default:

To me this means that there should be no difference between having an explicit "type": "shell" and not having "type" specified at all.


In practice, this does not seem to be the case. To reproduce, create a tasks.json that looks like this:

{
	"version": "2.0.0",
	"tasks": [
		{
			"label": "test",
			"command": "test"
		}
	]
}

Also add this test.cmd file to your workspace root:

echo hello

It may be necessary to have "terminal.integrated.shell.windows": "cmd.exe" in the settings as well.

Running the test task results in this error:

> Executing task: <workspace-path>\test  <

The terminal shell path "<workspace-path>\test" does not exist

Now add an explicit "type": "shell" to the task - it now works as expected:

> Executing task: test <


<workspace-path>>echo hello 
hello

Conclusion: either the default value of "type" is not actually "shell", or something else is wrong.

@vscodebot
Copy link

vscodebot bot commented Feb 26, 2020

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

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug tasks Task system issues labels Feb 27, 2020
@alexr00 alexr00 added this to the March 2020 milestone Feb 27, 2020
@alexr00 alexr00 closed this as completed in f25c38d Mar 5, 2020
@dbaeumer dbaeumer added the verified Verification succeeded label Apr 2, 2020
@dbaeumer
Copy link
Member

dbaeumer commented Apr 2, 2020

Verified that process is now the default value.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2020
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