Bug 1594520 - Change directory before running mach in .vscode/tasks.json on Windows. r=jya
authorTed Campbell <tcampbell@mozilla.com>
Thu, 14 Nov 2019 10:35:12 +0000
changeset 501949 4e3a2ac7a81d5fea15fe332f478037d8d4b0e925
parent 501948 393442f15e7de96ea6e34cee4fe722f60fab1532
child 501950 5b466cf155f9df1f059731abc615cf775e6a5ca0
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1594520
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1594520 - Change directory before running mach in .vscode/tasks.json on Windows. r=jya The build is quite fragile if the path to mach is not precisely formatted. Work around this by cd-ing to the appropriate directory and then calling 'mach' with a relative path. This mimics a normal user workflow in mozilla-build. Differential Revision: https://phabricator.services.mozilla.com/D52968
.vscode/tasks.json
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -3,18 +3,22 @@
     // for the documentation about the tasks.json format
     "version": "2.0.0",
     "type": "shell",
     "command": "${workspaceFolder}/mach",
     "args": ["--log-no-times"],
     "windows": {
       "command": "/mozilla-build/start-shell.bat",
       "args": [
+        "cd",
         // Use PowerShell to mangle path for mozilla-build environment
-        {"value": "$('${workspaceFolder}\\mach' -replace '\\\\','/')", "quoting": "weak"},
+        {"value": "$('${workspaceFolder}' -replace '\\\\','/')", "quoting": "weak"},
+        "';'",
+
+        "mach",
         "--log-no-times"
       ]
     },
     "tasks": [
       {
         "label": "clobber",
         "args": ["clobber"],
         "problemMatcher": []