Skip to content

Commit

Permalink
fix #152 - modify browserstack config file path to work
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickathompson authored and Patrick Thompson committed Aug 5, 2024
1 parent defc9a3 commit ffe20fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { parse as parseUrl } from 'url';
import path from 'node:path';
import Promise from 'pinkie';
import { promisify } from 'util';
import parseCapabilities from 'desired-capabilities';
Expand Down Expand Up @@ -137,12 +138,12 @@ module.exports = {
},

_getCapabilitiesFromConfig () {
const configPath = process.env.BROWSERSTACK_CAPABILITIES_CONFIG_PATH;
const configPath = String(path.relative(__dirname, path.resolve(process.env.BROWSERSTACK_CAPABILITIES_CONFIG_PATH)));

if (!configPath)
return {};

return require(configPath);
return require(configPath);
},

_getAdditionalCapabilities () {
Expand Down

0 comments on commit ffe20fc

Please sign in to comment.