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

'dependsOn' task is launching tasks with 'taskName' as command line parameters #31731

Closed
TheColorRed opened this issue Jul 30, 2017 · 2 comments
Assignees
Labels
tasks Task system issues

Comments

@TheColorRed
Copy link

  • VSCode Version: Code 1.14.2 (cb82feb, 2017-07-19T23:26:08.116Z)
  • OS Version: Linux x64 4.10.0-26-generic

I have a tasks.json that has a dependsOn in it, and when I run my default task ctrl+b it starts the task. However, it launches the dependents incorrectly.

Instead of running

tsc -w -p /src/typescript/client
tsc -w -p /src/typescript/server

It is running the following where build client and build server are my dependency task names.

tsc build client -w -p /src/typescript/client
tsc build server -w -p /src/typescript/server
{
  "version": "2.0.0",
  "command": "tsc",
  "problemMatcher": "$tsc",
  "isBackground": false,
  "type": "process",
  "echoCommand": true,
  "tasks": [
    {
      "taskName": "build",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "dependsOn": [
        "build client",
        "build server"
      ]
    },
    {
      "taskName": "build client",
      "args": [
        "-w",
        "-p",
        "${workspaceRoot}/src/typescript/client"
      ]
    },
    {
      "taskName": "build server",
      "args": [
        "-w",
        "-p",
        "${workspaceRoot}/src/typescript/server"
      ]
    }
  ]
}
@vscodebot vscodebot bot added new release tasks Task system issues labels Jul 30, 2017
@Lixire
Copy link
Contributor

Lixire commented Jul 31, 2017

I think the format of tasks.json that you want is this:

{
  "version": "2.0.0",
  "tasks": [
    {
      "taskName": "build",
      "command": "tsc",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "dependsOn": [
        "build client",
        "build server"
      ]
    },
    {
      "taskName": "build client",
      "command": "tsc",
      "args": [
        "-w",
        "-p",
        "${workspaceRoot}/src/typescript/client"
      ]
    },
    {
      "taskName": "build server",
      "command": "tsc",
      "args": [
        "-w",
        "-p",
        "${workspaceRoot}/src/typescript/server"
      ]
    }
  ]
}

Did that fix your problem?

@TheColorRed
Copy link
Author

Yeah that works.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tasks Task system issues
Projects
None yet
Development

No branches or pull requests

3 participants