I have a command where $string_or_null_value
is either a string or null. If null, the user is prompted an input box to enter its own value due to ${input:store_id}
. The issue is that the input box is always prompted even when it's not required. I've been through the Input Variables doc and tasks code but I have a hard time figuring this out. What's the best approach?
{
"version": "2.0.0",
"tasks": [
{
"label": "my-task",
"type": "shell",
"command": "id=$($string_or_null_value || echo \"${input:store_id}\"); my_command=$id"
}
],
"inputs": [
{
"id": "store_id",
"description": "Store id",
"type": "promptString"
}
]
}