File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -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 }
Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ class MyReporter {
284284 if ( ! isBrowserstackInfra ( ) ) gitConfigPath = process . env . OBSERVABILITY_GIT_CONFIG_PATH_LOCAL ? process . env . OBSERVABILITY_GIT_CONFIG_PATH_LOCAL . toString ( ) : null ;
285285 const prefixedTestPath = rootParentFile ? this . _paths . prefixTestPath ( rootParentFile ) : 'File path could not be found' ;
286286
287- const { fileSeparator, fileSeparatorRegex } = getFileSeparatorData ( ) ;
287+ const fileSeparator = getFileSeparatorData ( ) ;
288288
289289 let testData = {
290290 'framework' : 'Cypress' ,
You can’t perform that action at this time.
0 commit comments