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

deno task passed rest arguments to dependencies unintentionally #27206

Closed
4513ECHO opened this issue Dec 3, 2024 · 0 comments · Fixed by #27213
Closed

deno task passed rest arguments to dependencies unintentionally #27206

4513ECHO opened this issue Dec 3, 2024 · 0 comments · Fixed by #27213
Assignees
Labels
bug Something isn't working correctly task runner related to deno task

Comments

@4513ECHO
Copy link

4513ECHO commented Dec 3, 2024

Version: Deno 2.1.2

Example: with following deno.json

{
  "tasks": {
    "deploy": {
      "command": "deno run --env-file -A jsr:@deno/deployctl deploy",
      "dependencies": [
        "build"
      ]
    },
    "build": "vite build --mode client && vite build"
  }
}

and when I try to deploy a project:

$ deno task deploy --prod
Task build vite build --mode client && vite build "--prod"
... ("Unknown option" error will be occurred here)

I want to pass the --prod argument to only deploy task, but how to?

@marvinhagemeister marvinhagemeister added bug Something isn't working correctly task runner related to deno task labels Dec 3, 2024
@marvinhagemeister marvinhagemeister self-assigned this Dec 3, 2024
marvinhagemeister added a commit that referenced this issue Dec 3, 2024
When we run `deno task` with args like `deno task foo arg` the argument
should only be passed to the root task, not to its dependencies.

Fixes #27206
bartlomieju pushed a commit that referenced this issue Dec 5, 2024
When we run `deno task` with args like `deno task foo arg` the argument
should only be passed to the root task, not to its dependencies.

Fixes #27206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly task runner related to deno task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants