const fixes

This commit is contained in:
Girish Ramakrishnan
2024-06-06 11:33:42 +02:00
parent 00f6ef7603
commit 4fac0cb535

View File

@@ -71,7 +71,7 @@ async function allocateContainerIp(app) {
await promiseRetry({ times: 10, interval: 0, debug }, async function () {
const iprange = iputils.intFromIp(constants.APPS_IPv4_END) - iputils.intFromIp(constants.APPS_IPv4_START);
let rnd = Math.floor(Math.random() * iprange);
const rnd = Math.floor(Math.random() * iprange);
const containerIp = iputils.ipFromInt(iputils.intFromIp(constants.APPS_IPv4_START) + rnd);
await updateApp(app, { containerIp });
});
@@ -133,7 +133,7 @@ async function deleteAppDir(app, options) {
// remove only files. directories inside app dir are currently volumes managed by the addons
// we cannot delete those dirs anyway because of perms
entries.forEach(function (entry) {
let stat = safe.fs.statSync(path.join(resolvedAppDataDir, entry));
const stat = safe.fs.statSync(path.join(resolvedAppDataDir, entry));
if (stat && !stat.isDirectory()) safe.fs.unlinkSync(path.join(resolvedAppDataDir, entry));
});
}
@@ -247,7 +247,7 @@ async function updateChecklist(app, newChecks) {
// add new checklist items depending on sso state
const checklist = app.checklist || {};
for (let k in newChecks) {
for (const k in newChecks) {
if (app.checklist[k]) continue;
const item = {