Fix logging when starting an application
This commit is contained in:
parent
e3b9a094d8
commit
aca7e0d535
1 changed files with 7 additions and 1 deletions
|
@ -192,8 +192,13 @@ export default class Core extends EventEmitter{
|
||||||
.orderBy('installed', 'desc')
|
.orderBy('installed', 'desc')
|
||||||
.value()
|
.value()
|
||||||
|
|
||||||
|
this.logActive(name, active, `[${name}] Finding available version of ${name}\n`)
|
||||||
|
|
||||||
for (let i = 0; i < history.length; i++) {
|
for (let i = 0; i < history.length; i++) {
|
||||||
if (history[i].stable < 0) continue
|
if (history[i].stable < 0) {
|
||||||
|
this.logActive(name, active, `[${name}] Skipping version ${history[i].name} due to marked as unstable\n`)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
await this.db.set(`core.${name}Active`, history[i].name)
|
await this.db.set(`core.${name}Active`, history[i].name)
|
||||||
.write()
|
.write()
|
||||||
|
@ -214,6 +219,7 @@ export default class Core extends EventEmitter{
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.db.get(`core.${name}Active`).value()) {
|
if (!this.db.get(`core.${name}Active`).value()) {
|
||||||
|
this.logActive(name, active, `[${name}] Could not find any available stable version of ${name}\n`)
|
||||||
this.log.error('Unable to start ' + name)
|
this.log.error('Unable to start ' + name)
|
||||||
this.log.event.error('Unable to start ' + name)
|
this.log.event.error('Unable to start ' + name)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue