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

Test: runTask args #155350

Closed
3 tasks done
meganrogge opened this issue Jul 15, 2022 · 2 comments
Closed
3 tasks done

Test: runTask args #155350

meganrogge opened this issue Jul 15, 2022 · 2 comments

Comments

@meganrogge
Copy link
Contributor

meganrogge commented Jul 15, 2022

Refs #153145 and #154201

The run task command can result in a lot of entries/options. Users want to be able to setup a keybinding to trigger a more refined search of this list. The old way of doing this was to provide a string as the args in the form of the task's label (for example, VS Code - Build).

There are two new arguments we support:

taskName: the task's label (for example, VS Code - Build) if there's an exact match or will be used as a filter. Note that this will take precedence over the type

type: the task's type that corresponds to the type property found in the tasks.json file that indicates the extension owner, shell, or process.

The format is args: { taskName?: string, type?: string}

Setup some keybindings and verify that the old and new arguments work.

Authors: @meganrogge @Tyriar

Complexity: 2

Create Issue


Known issues:

@rchiodo
Copy link
Contributor

rchiodo commented Jul 26, 2022

Minor nit, but it doesn't seem like the type has to match?

I have this in the keybindings:

  {
    "command": "workbench.action.tasks.runTask",
    "args": { "taskName": "TestTask", "type": "process" },
    "key": "ctrl+shift+t"
  }

And a task like so:

    {
      "label": "TestTask",
      "type": "shell",
      "command": "echo Hello from user",
      "problemMatcher": [],
      "group": "build"
    }

And it still runs the task even though the type is different.

@rchiodo rchiodo removed their assignment Jul 26, 2022
@meganrogge
Copy link
Contributor Author

yeah @rchiodo when a taskName is provided, it takes precedence over and ignores type

@brettcannon brettcannon removed their assignment Jul 26, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants