Merge pull request #766 from halkeye/fix-docker-build

This commit is contained in:
Enno Gelhaus 2025-06-04 17:32:30 +02:00 committed by GitHub
commit 5a1427f990
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
const { readdirSync, statSync, writeFileSync } = require('fs');
const { readdirSync, statSync, writeFileSync, existsSync } = require('fs');
const { join } = require('path');
function isNonEmptyFolder(folderPath) {
@ -18,6 +18,10 @@ function isNonEmptyFolder(folderPath) {
// Function to get all non-empty folders
function getNonEmptyFolders(rootFolder) {
const result = [];
if (!existsSync(rootFolder)) {
return result;
}
const items = readdirSync(rootFolder);
items.forEach((item) => {