Skip to content

Regression: build task does not appear to terminate until user hits return in terminal #37846

@gwk

Description

@gwk
  • VSCode Version: Version 1.18.0-insider (1.18.0-insider) dcee220
  • OS Version: macOS 10.13.2 beta 17C67b

Steps to Reproduce:

  1. Create new project directory, with .vscode/tasks.json:
{
  "version": "2.0.0",
  "echoCommand": false,
  "type": "process",
  "presentation": {},
  "tasks": [
    {
      "label": "build",
      "command": "./build.sh",
      "args": ["${relativeFile}"],
      "group": {"kind": "build", "isDefault": true}
    }
  ]
}
  1. Create build.sh with executable permissions and contents:
#!/bin/sh

echo $@
sleep 2
echo "DONE."
  1. Run the build command on any file (running it on build.sh itself works fine).

The task will print done and presumably terminate. However the VSCode terminal window will not show it as terminated, and if I press the "build" keybinding again I get "The task 'typecheck-current (vscode-task-unterminated)' is already active. To terminate it use Terminate Task... from the Tasks menu." However if I press return in the integrated terminal then I will immediately get the expected "Terminal will be reused by tasks, press any key to close it."

If you remove the sleep 2 then the problem becomes very hard to reproduce. I have occasionally had difficulty reproducing it with the sleep, but by changing the sleep duration to a larger value I can usually trigger the bug. This makes me think that the problem is due to a change in the subprocess polling or something similar.

This regression occurred in the last few days. It is very annoying because now I have to click on the terminal and hit return after every type check.

Reproduces without extensions: Yes

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-prioritymacosIssues with VS Code on MAC/OS XterminalGeneral terminal issues that don't fall under another labelverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions