Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom task inputs: command has no value #105805

Closed
chrmarti opened this issue Sep 1, 2020 · 3 comments
Closed

Custom task inputs: command has no value #105805

chrmarti opened this issue Sep 1, 2020 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues verified Verification succeeded
Milestone

Comments

@chrmarti
Copy link
Contributor

chrmarti commented Sep 1, 2020

Issue Type: Bug

#105736

The same input works when I use it for flavor, but not for flags. The same happens with ${input:chooseFlag}:

  ERR '${input:chooseNumber}' can not be resolved because the command has no value.: Error: '${input:chooseNumber}' can not be resolved because the command has no value.
    at g.resolveFromMap (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3784:73)
    at g.evaluateSingleVariable (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3782:628)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:598
    at String.replace (<anonymous>)
    at g.resolveString (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:553)
    at g.recursiveResolve (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:268)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:328
    at Array.map (<anonymous>)
    at g.recursiveResolve (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:316)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:479
    at Array.forEach (<anonymous>)
    at g.recursiveResolve (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:421)
    at g.resolveAnyBase (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3780:637)
    at g.resolveAny (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3780:706)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4521:517
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:96:67)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:5686:652
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:96:67)
    at T.executeInTerminal (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4344:341)
{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "custombuildscript",
            "flavor": "${input:chooseFlag}",
            "flags": [
                "${workspaceFolder}",
                "${input:chooseNumber}",
                // "${input:runCommand}"
            ],
            "problemMatcher": [],
            "label": "custombuildscript: 64 "
        }
    ],
    "inputs": [
        {
            "id": "chooseNumber",
            "description": "Choose a Number",
            "type": "pickString",
            "options": ["1", "2"]
        },
        {
            "id": "chooseFlag",
            "description": "Enter some Text",
            "type": "promptString"
        },
        // {
        //     "id": "runCommand",
        //     "type": "command",
        //     "command": "workbench.action.showWelcomePage"
        // }
    ]
}

VS Code version: Code - Insiders 1.49.0-insider (b6d4fec, 2020-09-01T05:48:29.841Z)
OS version: Darwin x64 19.4.0

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 32.00GB (0.10GB free)
Process Argv --crash-reporter-id 7aad610c-0e6b-48aa-ba87-b704b1b543cf
Screen Reader no
VM 22%
@chrmarti
Copy link
Contributor Author

chrmarti commented Sep 1, 2020

Also: ${defaultBuildTask} works in the string property, but not in the array property. (It stays unreplaced.)

@chrmarti
Copy link
Contributor Author

chrmarti commented Sep 1, 2020

Similar: ${command:foobar} works in the string property, but lets the task fail when in the array property:

ERR '${command:foobar}' can not be resolved because the command has no value.: Error: '${command:foobar}' can not be resolved because the command has no value.
    at g.resolveFromMap (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3784:73)
    at g.evaluateSingleVariable (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3782:572)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:598
    at String.replace (<anonymous>)
    at g.resolveString (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:553)
    at g.recursiveResolve (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:268)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:328
    at Array.map (<anonymous>)
    at g.recursiveResolve (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:316)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:479
    at Array.forEach (<anonymous>)
    at g.recursiveResolve (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3781:421)
    at g.resolveAnyBase (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3780:637)
    at g.resolveAny (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3780:706)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4521:517
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:96:67)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:5686:652
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:96:67)
    at T.executeInTerminal (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4344:341)
localProcessExtensionHost.ts:239 Extension Host
localProcessExtensionHost.ts:240 Debugger attached.
```

There is also some interaction between string and array: If one of the above is in a string property it also work in the array property from what I see.

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug tasks Task system issues labels Sep 1, 2020
@alexr00 alexr00 added this to the August 2020 milestone Sep 1, 2020
@alexr00
Copy link
Member

alexr00 commented Sep 1, 2020

Also fixed by 27f7eba

@alexr00 alexr00 closed this as completed Sep 1, 2020
@connor4312 connor4312 added the verified Verification succeeded label Sep 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants