@@ -30,6 +30,11 @@ export const SUBSPACE_LONG_ARG_NAME: '--subspace' = '--subspace';
3030interface ISelectionParameterSetOptions {
3131 gitOptions : IGitSelectorParserOptions ;
3232 includeSubspaceSelector : boolean ;
33+ /**
34+ * The working directory used to resolve relative paths.
35+ * This should be the same directory that was used to find the Rush configuration.
36+ */
37+ cwd : string ;
3338}
3439
3540/**
@@ -59,7 +64,7 @@ export class SelectionParameterSet {
5964 action : CommandLineParameterProvider ,
6065 options : ISelectionParameterSetOptions
6166 ) {
62- const { gitOptions, includeSubspaceSelector } = options ;
67+ const { gitOptions, includeSubspaceSelector, cwd } = options ;
6368 this . _rushConfiguration = rushConfiguration ;
6469
6570 const selectorParsers : Map < string , ISelectorParser < RushConfigurationProject > > = new Map <
@@ -73,7 +78,7 @@ export class SelectionParameterSet {
7378 selectorParsers . set ( 'tag' , new TagProjectSelectorParser ( rushConfiguration ) ) ;
7479 selectorParsers . set ( 'version-policy' , new VersionPolicyProjectSelectorParser ( rushConfiguration ) ) ;
7580 selectorParsers . set ( 'subspace' , new SubspaceSelectorParser ( rushConfiguration ) ) ;
76- selectorParsers . set ( 'path' , new PathProjectSelectorParser ( rushConfiguration , process . cwd ( ) ) ) ;
81+ selectorParsers . set ( 'path' , new PathProjectSelectorParser ( rushConfiguration , cwd ) ) ;
7782
7883 this . _selectorParserByScope = selectorParsers ;
7984
0 commit comments