mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2024-11-25 05:26:22 +03:00
Fix debug event call after resolve (#30)
This commit is contained in:
parent
4758defde4
commit
73bf1fe232
1 changed files with 6 additions and 5 deletions
|
@ -21,16 +21,17 @@ class Handler {
|
|||
checkJava(java) {
|
||||
return new Promise(resolve => {
|
||||
child.exec(`${java} -version`, (error, stdout, stderr) => {
|
||||
if(error) {
|
||||
if (error) {
|
||||
resolve({
|
||||
run: false,
|
||||
message: error
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.client.emit('debug', `[MCLC]: Using Java version ${stderr.match(/"(.*?)"/).pop()} ${stderr.includes('64-Bit') ? '64-bit': '32-Bit'}`);
|
||||
resolve({
|
||||
run: true
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue