Skip to content

fix(task): escape backticks in forwarded args - #34151

Merged
bartlomieju merged 1 commit into
mainfrom
orch/issue-122
May 17, 2026
Merged

bartlomieju merged 1 commit into
mainfrom
orch/issue-122

Conversation

@fibibot

@fibibot fibibot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #32918.
Closes bartlomieju/orchid-inbox#122

This escapes backticks when deno task appends forwarded args to the task shell command string, matching the existing escaping for double quotes and dollar signs. That keeps literal backtick args from being parsed as task-shell command substitution.

Tests:

  • ./x fmt --check cli/task_runner.rs tests/specs/task/additional_args_no_backtick_expansion/test.jsonc tests/specs/task/additional_args_no_backtick_expansion/deno.json
  • ./x test-spec additional_args_no_backtick_expansion
  • ./x test-spec additional_args_no_shell_expansion

AI assistance disclosure: This PR was implemented with help from OpenAI Codex.

@lunadogbot lunadogbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Escaping backticks in get_script_with_args() closes the other command-substitution form on the same synthesized double-quoted arguments where $ was already escaped. The new spec covers a forwarded `func()` argument and verifies it reaches the task literally instead of being parsed as shell syntax.

Holding approval until CI is green; wpt release linux-x86_64 is still running.

@lunadogbot lunadogbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is green now, promoting prior review to APPROVE.

@lunadogbot

Copy link
Copy Markdown
Contributor

@bartlomieju this is ready to merge

@bartlomieju
bartlomieju merged commit 98ce50c into main May 17, 2026
136 checks passed
@bartlomieju
bartlomieju deleted the orch/issue-122 branch May 17, 2026 07:24
littledivy pushed a commit to crowlKats/deno that referenced this pull request Jun 10, 2026
Fixes denoland#32918.

This escapes backticks when deno task appends forwarded args to the task
shell command string, matching the existing escaping for double quotes
and dollar signs. That keeps literal backtick args from being parsed as
task-shell command substitution.

Co-authored-by: fibibot <fibibot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deno task fails parsing within backticks

3 participants