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({
138
138
dryRun : commandOptions . dryRun
139
139
} ;
140
140
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 ? '' :
144
144
parsedPath . appRoot . startsWith ( root )
145
145
? parsedPath . appRoot . substr ( root . length )
146
146
: parsedPath . appRoot ;
147
147
148
148
commandOptions . path = parsedPath . dir . replace ( separatorRegEx , '/' ) ;
149
- commandOptions . path = parsedPath . dir === appConfig . root ? '' :
149
+ commandOptions . path = parsedPath . dir === parsedPath . sourceDir ? '' :
150
150
parsedPath . dir . startsWith ( root )
151
151
? commandOptions . path . substr ( root . length )
152
152
: commandOptions . path ;
Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ export interface DynamicPathOptions {
12
12
13
13
export function dynamicPathParser ( options : DynamicPathOptions ) {
14
14
const projectRoot = options . project . root ;
15
- const sourceDir = options . appConfig . root ;
15
+ const sourceDir = options . appConfig . root . replace ( '/' , path . sep ) ;
16
16
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 ) ;
18
20
const appRoot = path . join ( sourceDir , p ) ;
19
21
const cwd = process . env . PWD ;
20
22
You can’t perform that action at this time.
0 commit comments