mirror of
https://github.com/kasmtech/kasm-install-wizard.git
synced 2026-01-23 02:34:27 +00:00
fix old bug if no images are selected install and upgrade bombs out
This commit is contained in:
parent
e599398710
commit
58775a6491
1 changed files with 11 additions and 2 deletions
13
index.js
13
index.js
|
|
@ -117,7 +117,11 @@ io.on('connection', async function (socket) {
|
|||
|
||||
// Write finalized image data
|
||||
let yamlStr = yaml.dump(imagesI);
|
||||
await fsw.writeFile('/kasm_release/conf/database/seed_data/default_images_' + arch + '.yaml', yamlStr);
|
||||
if (yamlStr.startsWith("false")) {
|
||||
installFlags = installFlags.filter(function(e) { return e !== '-W' });
|
||||
} else {
|
||||
await fsw.writeFile('/kasm_release/conf/database/seed_data/default_images_' + arch + '.yaml', yamlStr);
|
||||
}
|
||||
|
||||
// Copy over version
|
||||
await fsw.copyFile('/version.txt', '/opt/version.txt');
|
||||
|
|
@ -153,7 +157,12 @@ io.on('connection', async function (socket) {
|
|||
|
||||
// Write finalized image data
|
||||
let yamlStr = yaml.dump(imagesI);
|
||||
await fsw.writeFile('/kasm_release/conf/database/seed_data/default_images_' + arch + '.yaml', yamlStr);
|
||||
if (yamlStr.startsWith("false")) {
|
||||
upgradeFlags = upgradeFlags.filter(function(e) { return e !== '-K' });
|
||||
upgradeFlags = upgradeFlags.filter(function(e) { return e !== '-U' });
|
||||
} else {
|
||||
await fsw.writeFile('/kasm_release/conf/database/seed_data/default_images_' + arch + '.yaml', yamlStr);
|
||||
}
|
||||
|
||||
// Copy over version
|
||||
await fsw.copyFile('/version.txt', '/opt/version.txt');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue