File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -138,15 +138,15 @@ export default Command.extend({
138138 dryRun : commandOptions . dryRun
139139 } ;
140140 const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
141- commandOptions . sourceDir = appConfig . root ;
142- const root = appConfig . root + path . sep ;
143- commandOptions . appRoot = parsedPath . appRoot === appConfig . root ? '' :
141+ commandOptions . sourceDir = parsedPath . sourceDir ;
142+ const root = parsedPath . sourceDir + path . sep ;
143+ commandOptions . appRoot = parsedPath . appRoot === parsedPath . sourceDir ? '' :
144144 parsedPath . appRoot . startsWith ( root )
145145 ? parsedPath . appRoot . substr ( root . length )
146146 : parsedPath . appRoot ;
147147
148148 commandOptions . path = parsedPath . dir . replace ( separatorRegEx , '/' ) ;
149- commandOptions . path = parsedPath . dir === appConfig . root ? '' :
149+ commandOptions . path = parsedPath . dir === parsedPath . sourceDir ? '' :
150150 parsedPath . dir . startsWith ( root )
151151 ? commandOptions . path . substr ( root . length )
152152 : commandOptions . path ;
Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ export interface DynamicPathOptions {
1212
1313export function dynamicPathParser ( options : DynamicPathOptions ) {
1414 const projectRoot = options . project . root ;
15- const sourceDir = options . appConfig . root ;
15+ const sourceDir = options . appConfig . root . replace ( '/' , path . sep ) ;
1616
17- const p = options . appConfig . appRoot === undefined ? 'app' : options . appConfig . appRoot ;
17+ const p = options . appConfig . appRoot === undefined
18+ ? 'app'
19+ : options . appConfig . appRoot . replace ( '/' , path . sep ) ;
1820 const appRoot = path . join ( sourceDir , p ) ;
1921 const cwd = process . env . PWD ;
2022
You can’t perform that action at this time.
0 commit comments