@@ -163,24 +163,19 @@ exports.getTestEnv = () => {
163
163
}
164
164
165
165
exports . getFileSeparatorData = ( ) => {
166
- const fileSeparatorRegex = / ^ w i n / . test ( process . platform ) ? "\\\\" : "/" ;
167
- const fileSeparator = / ^ w i n / . test ( process . platform ) ? "\\" : "/" ;
168
- return {
169
- fileSeparator,
170
- fileSeparatorRegex
171
- } ;
166
+ return / ^ w i n / . test ( process . platform ) ? "\\" : "/" ;
172
167
}
173
168
174
169
exports . findGitConfig = ( filePath ) => {
175
- const { fileSeparator, fileSeparatorRegex } = exports . getFileSeparatorData ( ) ;
170
+ const fileSeparator = exports . getFileSeparatorData ( ) ;
176
171
if ( filePath == null || filePath == '' || filePath == fileSeparator ) {
177
172
return null ;
178
173
}
179
174
try {
180
175
fs . statSync ( filePath + fileSeparator + '.git' + fileSeparator + 'config' ) ;
181
176
return filePath ;
182
177
} catch ( e ) {
183
- let parentFilePath = filePath . split ( fileSeparatorRegex ) ;
178
+ let parentFilePath = filePath . split ( fileSeparator ) ;
184
179
parentFilePath . pop ( ) ;
185
180
return exports . findGitConfig ( parentFilePath . join ( fileSeparator ) ) ;
186
181
}
@@ -1003,7 +998,7 @@ exports.runCypressTestsLocally = (bsConfig, args, rawArgs) => {
1003
998
const cypressProcess = spawn (
1004
999
'npx' ,
1005
1000
[ 'cypress' , 'run' , ...getReRunSpecs ( rawArgs . slice ( 1 ) ) , ...getLocalSessionReporter ( ) ] ,
1006
- { stdio : 'inherit' , cwd : process . cwd ( ) , env : process . env }
1001
+ { stdio : 'inherit' , cwd : process . cwd ( ) , env : process . env , shell : true }
1007
1002
) ;
1008
1003
cypressProcess . on ( 'close' , async ( code ) => {
1009
1004
logger . info ( `Cypress process exited with code ${ code } ` ) ;
0 commit comments