Skip to content

User input "promptString" for task is broken when empty #245665

@Shulcare

Description

@Shulcare

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.99.0
  • OS Version: Windows 11 Enterprise Build 22631

Steps to Reproduce:

  1. Create a task in tasks.json that takes a user input as argument.
  2. Create a user input in tasks.json of type "promptString".
  3. Call the task and enter an empty field as user input.
  4. The task won't start at all.

Entering anything non-empty as input, e.g. a space, will start the task.
The exact same behaviour was also seen on the PC of my colleague after this update.
Before 1.99.0, empty strings worked fine as input and the task would always start normally.

My example:

"label": "build_pynmp",
...
"args": [
        "${workspaceFolder}/tools/pynmp/pynmp.py",
        "build",
        {
          "value": "${input:build_args_py}",
          "quoting": "weak"
        },
],

The user input is defined like this:
"inputs": [
    {
      "id": "build_args_py",
      "description": "blabla",
      "type": "promptString",
    },
]

I've tried different settings for quoting and used it in different tasks, too, but an empty string of type "promptString" does now prevent the task from starting. Type "pickString" works fine with empty input.
Interestingly, it does not even work when I add a fixed space in the argument like "value": "${input:build_args_py} " .

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugtasksTask system issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions