Skip to content

Commit 5a1427f

Browse files
authored
Merge pull request #766 from halkeye/fix-docker-build
2 parents 0f49e19 + 0f19dde commit 5a1427f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

build.plugins.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { readdirSync, statSync, writeFileSync } = require('fs');
1+
const { readdirSync, statSync, writeFileSync, existsSync } = require('fs');
22
const { join } = require('path');
33

44
function isNonEmptyFolder(folderPath) {
@@ -18,6 +18,10 @@ function isNonEmptyFolder(folderPath) {
1818
// Function to get all non-empty folders
1919
function getNonEmptyFolders(rootFolder) {
2020
const result = [];
21+
if (!existsSync(rootFolder)) {
22+
return result;
23+
}
24+
2125
const items = readdirSync(rootFolder);
2226

2327
items.forEach((item) => {

0 commit comments

Comments
 (0)