Skip to content

fix: do not forward geckoDriverVersion as a CLI argument to geckodriver binary#732

Merged
christian-bromann merged 1 commit into
webdriverio-community:mainfrom
mccmrunal:fix/geckodriver-version-arg-leak
Jul 2, 2026
Merged

fix: do not forward geckoDriverVersion as a CLI argument to geckodriver binary#732
christian-bromann merged 1 commit into
webdriverio-community:mainfrom
mccmrunal:fix/geckodriver-version-arg-leak

Conversation

@mccmrunal

@mccmrunal mccmrunal commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings June 29, 2026 15:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes start() so geckoDriverVersion is used only to select/download the correct geckodriver binary and is no longer forwarded to the geckodriver process as a CLI flag (which geckodriver rejects as an unknown argument).

Changes:

  • Exclude geckoDriverVersion from the argument object passed to parseParams() / cp.spawn().
  • Continue passing geckoDriverVersion through to the downloader when a download is required.
  • Add a unit test asserting the version is used for download but not emitted as a geckodriver CLI argument.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/index.ts Removes geckoDriverVersion from spawned CLI args while still using it for driver download.
tests/start-unit.test.ts Adds coverage to prevent regressions where geckoDriverVersion becomes a CLI arg.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/start-unit.test.ts
Comment on lines 2 to 6
import cp from 'node:child_process'
import { vi, test, expect } from 'vitest'
import { type GeckodriverParameters, start } from '../src/index.ts'
import { download } from '../src/install.js'

@christian-bromann christian-bromann merged commit 81f1824 into webdriverio-community:main Jul 2, 2026
14 checks passed
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.

3 participants