@@ -163,24 +163,19 @@ exports.getTestEnv = () => {
163163}
164164
165165exports . 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 ) ? "\\" : "/" ;
172167}
173168
174169exports . findGitConfig = ( filePath ) => {
175- const { fileSeparator, fileSeparatorRegex } = exports . getFileSeparatorData ( ) ;
170+ const fileSeparator = exports . getFileSeparatorData ( ) ;
176171 if ( filePath == null || filePath == '' || filePath == fileSeparator ) {
177172 return null ;
178173 }
179174 try {
180175 fs . statSync ( filePath + fileSeparator + '.git' + fileSeparator + 'config' ) ;
181176 return filePath ;
182177 } catch ( e ) {
183- let parentFilePath = filePath . split ( fileSeparatorRegex ) ;
178+ let parentFilePath = filePath . split ( fileSeparator ) ;
184179 parentFilePath . pop ( ) ;
185180 return exports . findGitConfig ( parentFilePath . join ( fileSeparator ) ) ;
186181 }
@@ -1002,7 +997,7 @@ exports.runCypressTestsLocally = (bsConfig, args, rawArgs) => {
1002997 const cypressProcess = spawn (
1003998 'npx' ,
1004999 [ 'cypress' , 'run' , ...getReRunSpecs ( rawArgs . slice ( 1 ) ) , ...getLocalSessionReporter ( ) ] ,
1005- { stdio : 'inherit' , cwd : process . cwd ( ) , env : process . env }
1000+ { stdio : 'inherit' , cwd : process . cwd ( ) , env : process . env , shell : true }
10061001 ) ;
10071002 cypressProcess . on ( 'close' , async ( code ) => {
10081003 logger . info ( `Cypress process exited with code ${ code } ` ) ;
0 commit comments