Add a new commands.json file or edit an existing one
Use a variable, e.g. $(SolutionDir) in any of the fields (should be supported in Filename, Workingdirectory, Arguments and Name (again, looking at the code), for example the arguments field for passing a variable to a PowerShell script
My appologies, I submitted an issue for the wrong task runner. Closed this one and re-created the issue for the appropriate task runner (CommandTaskRunner).
Installed product versions
Description
My commands.json file uses variables such as $(SolutionDir) but they don't get applied. Looking at the code they should be applied:
https://github.com/madskristensen/CommandTaskRunner/blob/master/src/TaskRunner/TaskRunnerProvider.cs
Steps to recreate
Example commands.json:
{ "commands": { "Publish": { "fileName": "powershell.exe", "workingDirectory": ".", "arguments": "-ExecutionPolicy ByPass -File \"..\build\publish.ps1\" -SolutionDir \"$(SolutionDir)\"" } } }
Current behavior
Upon running the task, the used variable is not being replaced, but used 'as-is'.
Expected behavior
Looking at the code, it should support variable replacing so that it gets populated by the correct value.