File tree Expand file tree Collapse file tree
libraries/rush-lib/src/logic/selectors Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,20 +31,24 @@ export class PathProjectSelectorParser implements ISelectorParser<RushConfigurat
3131 // Relativize it to the rushJsonFolder
3232 const relativePath : string = nodePath . relative ( this . _rushConfiguration . rushJsonFolder , absolutePath ) ;
3333
34+ // Normalize path separators to forward slashes for LookupByPath
35+ const normalizedPath : string = relativePath . split ( nodePath . sep ) . join ( '/' ) ;
36+
3437 // Get the LookupByPath instance for the Rush root
3538 const lookupByPath : LookupByPath < RushConfigurationProject > =
3639 this . _rushConfiguration . getProjectLookupForRoot ( this . _rushConfiguration . rushJsonFolder ) ;
3740
3841 // Check if this path is within a project or matches a project exactly
39- const containingProject : RushConfigurationProject | undefined = lookupByPath . findChildPath ( relativePath ) ;
42+ const containingProject : RushConfigurationProject | undefined =
43+ lookupByPath . findChildPath ( normalizedPath ) ;
4044
4145 if ( containingProject ) {
4246 return [ containingProject ] ;
4347 }
4448
4549 // Check if there are any projects under this path (i.e., it's a directory containing projects)
4650 const projectsUnderPath : Set < RushConfigurationProject > = new Set ( ) ;
47- for ( const [ , project ] of lookupByPath . entries ( relativePath ) ) {
51+ for ( const [ , project ] of lookupByPath . entries ( normalizedPath ) ) {
4852 projectsUnderPath . add ( project ) ;
4953 }
5054
You can’t perform that action at this time.
0 commit comments