I have the following tasks.json file with the options declared in the windows section
{
"version": "2.0.0",
"tasks": [
{
"label": "Bazel Build (Debug)",
"type": "shell",
"command": "bazel build --cxxopt='-std=c++17' ${relativeFileDirname}:${fileBasenameNoExtension} -c dbg",
"windows": {
"options": {
"env": {
"relativeFileDirname": "src/main"
}
},
"command": "bazel build --cxxopt='-std=c++17' ${relativeFileDirname}:${fileBasenameNoExtension} --enable_runfiles -c dbg --verbose_failures"
}
}
]
}
I am trying to change the relativeFileDirname environment paramter to src/main from src\main as Bazel is still looking for unix like directory separators, even on windows.
How can I get the options to change the environment variable for the windows build task only?