Skip to content

Tasks set to run on folder open run twice #75758

@kamenminkov

Description

@kamenminkov

Issue Type: Bug

VS Code version: Code - Insiders 1.36.0-insider (6520c22, 2019-06-19T05:19:10.147Z)

OS version: Windows_NT x64 10.0.18908

System Info
Item Value
CPUs Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz (12 x 3300)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.91GB (5.05GB free)
Process Argv --folder-uri file:///c%3A/Users/Kamen/Code/Stanga/Stylitics/stylitics-closet-essentials.sn77.net.git
Screen Reader no
VM 0%

Extensions: none

Steps to Reproduce:

  1. Set up a project with a tasks.json as below (can be an empty project with nothing else)
  2. From the command palette, execute Tasks: Allow Automatic Tasks in Folder
  3. Reload project

Expected behaviour after project restart: each task with "runOn": "folderOpen" is started once.

Actual behaviour after project restart: each task with "runOn": "folderOpen" is started twice.

{
	"version": "2.0.0",
	"tasks": [
		{
			"label": "My Task",
			"promptOnClose": false,
			"command": "echo hello",
			"type": "shell",
			"args": [],
			"problemMatcher": [
				"$tsc"
			],
			"presentation": {
				"reveal": "always",
				"panel": "shared"
			},
			"group": "build",
			"runOptions": {
				"runOn": "folderOpen"
			}
		}
	]
}

Does this issue occur when all extensions are disabled?: Yes

I also notice high CPU usage from a conhost.exe process spawned from VSCode; this might or might not be related.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugtasksTask system issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions