-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugtasksTask system issuesTask system issuesverifiedVerification succeededVerification succeeded
Milestone
Description
- VSCode Version: Code 1.17.2 (b813d12, 2017-10-16T13:59:46.104Z)
- OS Version: Windows_NT x64 10.0.15063
- Extensions: none
Steps to Reproduce:
- Create a new folder with an space somewhere in the full path, lets say "D:\Temp\Space here"
- Add a dummy.ts file, it could be empty
- Add a tsconfig.json file, it could be just a pair of curly braces:
{ } - Press Ctrl+Shift+P and type/select "Task: Configure Default Build Task" then select "tsc: build - tsconfig.json", the following "taks.json" is generated:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "typescript",
"tsconfig": "tsconfig.json",
"problemMatcher": [
"$tsc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
- Execute the build command with Ctrl+Shift+B shortcut
The following error message is displayed:
> Executing task: tsc -p "d:\Temp\Space here\tsconfig.json" <
error TS5042: Option 'project' cannot be mixed with source files on a command line.
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.
- Now close VS
- Rename the folder to remove the white space
- Execute the build command from VS again, now it works:
> Executing task: tsc -p "d:\Temp\Space_NOT_here\tsconfig.json" <
Terminal will be reused by tasks, press any key to close it.
Additional information:
Although the displayed command looks fine and will actually work if you Copy&Paste it into a Terminal window: tsc -p "d:\Temp\Space here\tsconfig.json"
the error message is consistent with what you'd get if you remove the quotes, which suggests they weren't there when the command was actually executed as a task by VS
EDIT: fix markdown issue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugtasksTask system issuesTask system issuesverifiedVerification succeededVerification succeeded