Repository: vscode
Issue: Terminal fails to launch on Task Rerun with "A native exception occurred during launch (args as a string is not supported on unix.)."
Labels: bug,help wanted,tasks

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: YES

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
Version: 1.89.1 (user setup)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:13:33.891Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631

Steps to Reproduce:

1. Tasks: Run Task with a `pickString` input
2. Tasks: Rerun Last Task 2-3 times
4. Terminal launch fails

Error is:

```
 *  The terminal process "/usr/bin/bash '-c', 'IFS=: read -r config variant <<< config_b:variant_a && build $config $variant'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task in folder firmware: IFS=':' read -r config variant <<< config_b:variant_a && build $config $variant


 *  The terminal process failed to launch: A native exception occurred during launch (args as a string is not supported on unix.). 
```

Logs:

[terminal.log](https://github.com/microsoft/vscode/files/15503456/terminal.log)
[remoteagent.log](https://github.com/microsoft/vscode/files/15503459/remoteagent.log)

My `tasks.json`:
```
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build config/variant",
            "type": "shell",
            "group": "build",
            "command": "IFS=: read -r config variant<<< ${input:pickConfig} && build $config $variant",
            "runOptions": {
                "reevaluateOnRerun": false,
            },
            "problemMatcher": [
                "$gcc"
            ],
        }
    ],
    "inputs": [
        {
            "id": "pickConfig",
            "type": "pickString",
            "description": "Pick the build config/variant",
            "options": [
                "config_a:variant_a",
                "config_b:variant_a",
                "config_c:variant_a",
                "config_d:variant_b",
                "config_e:variant_b",
                "config_f:variant_b",
            ]
        },
    ]
}