Skip to content

Commit

Permalink
fix: Fix env variable corruption
Browse files Browse the repository at this point in the history
The cache path was being prepended to the driver command before using
the command to compute the env var name.  This has now been fixed.
  • Loading branch information
joeyparrish committed Feb 3, 2022
1 parent 3a5038d commit 57cd5da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ const LocalWebDriverBase = function(

this.browserName = browserName;

// An environment variable that can be used to override the command path.
// Must be computed before the cache path is prepended to the driverCommand.
this.ENV_CMD = driverCommand.toUpperCase().replace('-', '_') + '_PATH';

if (driverCommand[0] == '/') {
// Absolute path. Keep it.
} else {
Expand All @@ -64,9 +68,6 @@ const LocalWebDriverBase = function(
// Called by the base class to get arguments to pass to the driver command.
this._getOptions = () => argsFromPort(port.toString());

// An environment variable that can be used to override the command path.
this.ENV_CMD = driverCommand.toUpperCase().replace('-', '_') + '_PATH';

const config = {
protocol: 'http:',
hostname: '127.0.0.1',
Expand Down

0 comments on commit 57cd5da

Please sign in to comment.