Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit 737f444

Browse files
author
icymind
committed
upgrade config before buildvm
1 parent 471606c commit 737f444

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

js/prepare.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async function buildVmHandler (vrouter) {
6666
winston.debug('start to build vm...')
6767
await vrouter.buildvm()
6868
winston.debug('vm builded')
69-
vue.data.content += `<li class="ui">等待虚拟机重新启动</li>`
69+
vue.data.content += `<li class="ui">虚拟机重新启动, 请稍候30秒</li>`
7070
winston.debug('starting vm...')
7171
await vrouter.startvm('headless', 30000)
7272
winston.debug('vm started')
@@ -231,14 +231,14 @@ async function checkRequirement (vrouter) {
231231
// closable: false
232232
// }
233233
// vue.show()
234+
redirect()
235+
}
236+
237+
document.addEventListener('DOMContentLoaded', async () => {
234238
const template = path.join(__dirname, '..', 'config', 'config.json')
235239
const newCfg = fs.readJsonSync(template)
236240
await vrouter.upgradeCfgV1(newCfg)
237241
await vrouter.upgradeCfgV2(newCfg)
238242
await vrouter.saveCfg2File()
239-
redirect()
240-
}
241-
242-
document.addEventListener('DOMContentLoaded', async () => {
243243
checkRequirement(vrouter)
244244
})

0 commit comments

Comments
 (0)