diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index fe59baa25..e50256fb6 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -76,8 +76,11 @@ function globToRegex(pattern) { const isGlob = f => /[?*]/.test(f) // All storage+data files in all apps: {app:,[file: | data:]} let allFiles = []; +let existingApps = []; apps.forEach((app,appIdx) => { if (!app.id) ERROR(`App ${appIdx} has no id`); + if (existingApps.includes(app.id)) ERROR(`Duplicate app '${app.id}'`); + existingApps.push(app.id); //console.log(`Checking ${app.id}...`); var appDir = APPSDIR+app.id+"/"; if (!fs.existsSync(APPSDIR+app.id)) ERROR(`App ${app.id} has no directory`);