@@ -44,7 +44,7 @@ function getRgArgs(config: IFileQuery, folderQuery: IFolderQuery, includePattern
4444 }
4545 } ) ;
4646
47- let siblingClauses : glob . IExpression ;
47+ let siblingClauses : glob . IExpression | null ;
4848
4949 const rgGlobs = foldersToRgExcludeGlobs ( [ folderQuery ] , excludePattern , undefined , false ) ;
5050 rgGlobs . globArgs . forEach ( globArg => {
@@ -85,15 +85,15 @@ function getRgArgs(config: IFileQuery, folderQuery: IFolderQuery, includePattern
8585
8686export interface IRgGlobResult {
8787 globArgs : string [ ] ;
88- siblingClauses : glob . IExpression ;
88+ siblingClauses : glob . IExpression | null ;
8989}
9090
9191export function foldersToRgExcludeGlobs ( folderQueries : IFolderQuery [ ] , globalExclude : glob . IExpression , excludesToSkip ?: Set < string > , absoluteGlobs = true ) : IRgGlobResult {
9292 const globArgs : string [ ] = [ ] ;
9393 let siblingClauses : glob . IExpression = { } ;
9494 folderQueries . forEach ( folderQuery => {
9595 const totalExcludePattern = objects . assign ( { } , folderQuery . excludePattern || { } , globalExclude || { } ) ;
96- const result = globExprsToRgGlobs ( totalExcludePattern , absoluteGlobs && folderQuery . folder . fsPath , excludesToSkip ) ;
96+ const result = globExprsToRgGlobs ( totalExcludePattern , absoluteGlobs ? folderQuery . folder . fsPath : undefined , excludesToSkip ) ;
9797 globArgs . push ( ...result . globArgs ) ;
9898 if ( result . siblingClauses ) {
9999 siblingClauses = objects . assign ( siblingClauses , result . siblingClauses ) ;
@@ -107,7 +107,7 @@ export function foldersToIncludeGlobs(folderQueries: IFolderQuery[], globalInclu
107107 const globArgs : string [ ] = [ ] ;
108108 folderQueries . forEach ( folderQuery => {
109109 const totalIncludePattern = objects . assign ( { } , globalInclude || { } , folderQuery . includePattern || { } ) ;
110- const result = globExprsToRgGlobs ( totalIncludePattern , absoluteGlobs && folderQuery . folder . fsPath ) ;
110+ const result = globExprsToRgGlobs ( totalIncludePattern , absoluteGlobs ? folderQuery . folder . fsPath : undefined ) ;
111111 globArgs . push ( ...result . globArgs ) ;
112112 } ) ;
113113
@@ -116,7 +116,7 @@ export function foldersToIncludeGlobs(folderQueries: IFolderQuery[], globalInclu
116116
117117function globExprsToRgGlobs ( patterns : glob . IExpression , folder ?: string , excludesToSkip ?: Set < string > ) : IRgGlobResult {
118118 const globArgs : string [ ] = [ ] ;
119- let siblingClauses : glob . IExpression = null ;
119+ let siblingClauses : glob . IExpression | null = null ;
120120 Object . keys ( patterns )
121121 . forEach ( key => {
122122 if ( excludesToSkip && excludesToSkip . has ( key ) ) {
0 commit comments