Skip to content

Fix configured run target precedence - #3781

Open
giri256 wants to merge 2 commits into
mozilla:masterfrom
giri256:fix/config-target-precedence-3314
Open

giri256 wants to merge 2 commits into
mozilla:masterfrom
giri256:fix/config-target-precedence-3314

Conversation

@giri256

@giri256 giri256 commented Jul 24, 2026

Copy link
Copy Markdown

Fixes #3314

Summary

  • Remove the yargs default from the array-valued run.target option so it is not mistaken for an explicit CLI value during config merging.
  • Keep Firefox Desktop as the effective default in the run command when no target is provided.
  • Add regression coverage for config precedence, explicit CLI precedence, and the undefined-target fallback.

Validation

  • npx prettier --check src/program.js tests/unit/test.program.js tests/unit/test-cmd/test.run.js
  • npx eslint src/program.js tests/unit/test.program.js tests/unit/test-cmd/test.run.js
  • npx mocha tests/unit/test.program.js tests/unit/test-cmd/test.run.js (83 passing)

@giri256

giri256 commented Jul 24, 2026

Copy link
Copy Markdown
Author

CI audit note: the only failing context is build-nodejs-current, at its final npm run audit-deps step. Prettier, unit/coverage tests, both functional-test modes, Node next/experimental, and Windows all pass.

The audit is reporting newly blocking advisories in existing dependencies (adm-zip, brace-expansion, fast-uri, and shell-quote); this PR does not modify dependency files. The same current-job failure pattern is also present on the repository's open Dependabot PRs #3780 and #3779, so this is not introduced by this change.

Comment thread src/program.js
describe:
'The extensions runners to enable. Specify this option ' +
'multiple times to run against multiple targets.',
default: 'firefox-desktop',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you update the describe to mention that firefox-desktop is the default option, e.g. between parentheses?

To see the effect of the configuration, run the command with --help.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated. web-ext run --help now shows: "The extensions runners to enable (default: firefox-desktop). Specify this option multiple times to run against multiple targets."

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.

run.target: ["chromium"] ignored in config

2 participants