@@ -30,7 +30,11 @@ module.exports = class SystemConfig {
|
||||
static getLocalKitPath(){
|
||||
let path = "./"
|
||||
if ( this.isWindows() ) {
|
||||
path = require('path').dirname(require.main.filename)
|
||||
if( require && require.main && require.main.filename ){
|
||||
path = require('path').dirname(require.main.filename)
|
||||
} else {
|
||||
path = process.cwd()
|
||||
}
|
||||
} else {
|
||||
path = require('path').dirname(process.execPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user