From c0df792f3b9b30e32a193b9475ca5ceaf15fc78c Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 4 Apr 2025 15:17:14 -0400 Subject: [PATCH] vscode: Fix error running build tasks Running tasks without explicit "cwd" broke in VSCode 1.99.0. --- tools/vscode/tasks.json | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/tools/vscode/tasks.json b/tools/vscode/tasks.json index 790de4fda..8d49cc78b 100644 --- a/tools/vscode/tasks.json +++ b/tools/vscode/tasks.json @@ -98,7 +98,7 @@ "tasks": [ // * If you want to be prompted for the output directory each // time you run a command, replace - // ${config:cef.outputDir[Debug|Release]} + // ${config:cef.outputDir[Debug|Release]Relative} // with // ${input:cefOutputDir} // @@ -110,9 +110,12 @@ "command": "autoninja", "args": [ "-C", - "${config:cef.outputDirDebug}", + "${config:cef.outputDirDebugRelative}", "cef" ], + "options": { + "cwd": "${workspaceFolder}" + }, "group": { "kind": "build", "isDefault": true @@ -124,9 +127,12 @@ "command": "autoninja", "args": [ "-C", - "${config:cef.outputDirRelease}", + "${config:cef.outputDirReleaseRelative}", "cef" ], + "options": { + "cwd": "${workspaceFolder}" + }, "group": { "kind": "build" } @@ -136,18 +142,24 @@ "type": "shell", "command": "compile_single_file", "args": [ - "--build-dir=${config:cef.outputDirDebug}", + "--build-dir=${config:cef.outputDirDebugRelative}", "--file-path=${file}" - ] + ], + "options": { + "cwd": "${workspaceFolder}" + } }, { "label": "4-build_current_file_release", "type": "shell", "command": "compile_single_file", "args": [ - "--build-dir=${config:cef.outputDirRelease}", + "--build-dir=${config:cef.outputDirReleaseRelative}", "--file-path=${file}" - ] + ], + "options": { + "cwd": "${workspaceFolder}" + } }, { "label": "5-build_tests_debug", @@ -155,10 +167,13 @@ "command": "autoninja", "args": [ "-C", - "${config:cef.outputDirDebug}", + "${config:cef.outputDirDebugRelative}", "ceftests", "libcef_static_unittests" - ] + ], + "options": { + "cwd": "${workspaceFolder}" + } }, { "label": "6-build_tests_release", @@ -166,10 +181,13 @@ "command": "autoninja", "args": [ "-C", - "${config:cef.outputDirRelease}", + "${config:cef.outputDirReleaseRelative}", "ceftests", "libcef_static_unittests" - ] + ], + "options": { + "cwd": "${workspaceFolder}" + } } ] }