Skip to content

Commit 7a7ee06

Browse files
committed
security fixes
1 parent 9d56014 commit 7a7ee06

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

bin/testObservability/crashReporter/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ let packages = {};
2727

2828
exports.requireModule = (module, internal = false) => {
2929
let local_path = "";
30-
if(process.env["browserStackCwd"]){
31-
local_path = path.join(process.env["browserStackCwd"], 'node_modules', module);
32-
} else if(internal) {
30+
if(internal) {
3331
local_path = path.join(process.cwd(), 'node_modules', 'browserstack-cypress-cli', 'node_modules', module);
3432
} else {
3533
local_path = path.join(process.cwd(), 'node_modules', module);

bin/testObservability/helper/helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -928,9 +928,9 @@ exports.runCypressTestsLocally = (bsConfig, args, rawArgs) => {
928928
rawArgs = cleanupTestObservabilityFlags(rawArgs);
929929
logger.info(`Running npx cypress run ${getReRunSpecs(rawArgs.slice(1)).join(' ')} ${getLocalSessionReporter().join(' ')}`);
930930
const cypressProcess = spawn(
931-
'npx',
931+
/^win/.test(process.platform) ? 'npx.cmd' : 'npx',
932932
['cypress', 'run', ...getReRunSpecs(rawArgs.slice(1)), ...getLocalSessionReporter()],
933-
{ stdio: 'inherit', cwd: process.cwd(), env: process.env, shell: true }
933+
{ stdio: 'inherit', cwd: process.cwd(), env: process.env, shell: false }
934934
);
935935
cypressProcess.on('close', async (code) => {
936936
logger.info(`Cypress process exited with code ${code}`);

0 commit comments

Comments
 (0)