Usage Of "input:getInput" Within Task That Also Contains DependsOn Gets Called Prior To Dependent Task. #203508
Closed
Description
opened on Jan 26, 2024
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.82.0
- Commit: 1606401
- OS Version: Linux x64 6.5.0-dirty
Steps to Reproduce:
"tasks": {
"version": "2.0.0",
"options": {
"env": {
}
},
"inputs": [
{
"id": "yesOrNo",
"description": "Pick One",
"type": "pickString",
"options": [
"Yes",
"No"
],
"default": "Yes"
},
{
"id": "remainingInput",
"type": "command",
"command": "shellCommand.execute",
"args": {
"description": "Choose a target to make",
"cwd": "${workspaceFolder:Linux Stable Source}",
"command": "/usr/bin/bash -c '${env:NOTHINGYET} --produceList'",
"taskId": "<whatever>",
"rememberPrevious": true
}
}
],
"tasks": [
{
"label": "0 Hidden Dependent Task",
"type": "process",
"options": {
"cwd": "${workspaceFolder:<whatever>}"
},
"command": "${workspaceFolder:<whateverOther>/scripts/<script to set options.env.<value>>.sh",
"args": [
"/<pathToThis>.code-workspace"
],
"hide": true
},
{
"label": "1 Visible Main Task",
"type": "process",
"options": {
"cwd": "${workspaceFolder:<whatever>}"
},
"command": "${workspaceFolder:<whatever>}/scripts/<script to set options.env.<value>>.sh",
"args": [
"/<pathToThis>.code-workspace",
"${input:yesOrNo}",
"${input:remainingInput}"
],
"dependsOn": [
"0 Hidden Dependent Task"
],
"dependsOrder": "sequence"
},
]
The problem is that when 1 Visible Main Task
is run, it is expected that 0 Hidden Dependent Task
is run before anything else happens (no env/config/input is checked/collected/ran).
When 0 Hidden Dependent Task
is run first, it sets tasks.options.env.NOTHINGYET
, at which point 1 Visible Main Task
can then continue where it left off using env:NOTHINGYET
for input:remainingInput
.
Activity