account for file:// when resolving app root
This commit is contained in:
parent
e21624368f
commit
f19adc5bf3
@ -123,7 +123,17 @@ export default class Application {
|
|||||||
* @type string
|
* @type string
|
||||||
*/
|
*/
|
||||||
get app_root() {
|
get app_root() {
|
||||||
return path.resolve(this.injector.make(Scaffolding).base_dir, 'app')
|
let base_dir = this.injector.make(Scaffolding).base_dir
|
||||||
|
if ( base_dir.startsWith('file://') ) {
|
||||||
|
base_dir = base_dir.slice(7)
|
||||||
|
}
|
||||||
|
|
||||||
|
const resolved = path.resolve(base_dir, 'app')
|
||||||
|
if ( resolved.startsWith('/') ) {
|
||||||
|
return `file://${resolved}`
|
||||||
|
} else {
|
||||||
|
return resolved
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user