Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCODE: How do i enable "tasks: Allow Automatic Tasks In Folder" by default?

I want "tasks: Allow Automatic Tasks In Folder" to be enabled by default when i open a project

this is the tasks.json

{
"version": "2.0.0",
"tasks": [
    {
        "type": "npm",
        "script": "gulp",
        "runOptions": {
            "runOn": "folderOpen"
        }
    }
]

}

it runs on start but only if i call "tasks: Allow Automatic Tasks In Folder" via cmd+shift+p and reopen the project

i need this to be enabled by default. How can i do that ?

like image 905
Manuel Lehenberger Avatar asked Jun 05 '19 18:06

Manuel Lehenberger


1 Answers

With VSCode 1.70 (July 2022) and issue 64618, there will also be a setting associated with the command "Allow Automatic Tasks in Folder".

See PR 154171 and commit 755d39f

There is now a task.allowAutomaticTasks to enable automatic tasks in the folder, with:

  • task.allowAutomaticTasks.on: Always
  • task.allowAutomaticTasks.auto: Prompt for permission for each folder
  • task.allowAutomaticTasks.off: Never

This is available today (July 2022) in the insider release.

like image 127
VonC Avatar answered Oct 21 '22 17:10

VonC