1
0
mirror of https://github.com/Minionguyjpro/Inno-Setup-Action synced 2026-02-18 09:31:19 +01:00

src/index.js: Another fix

This commit is contained in:
Minionguyjpro
2024-10-12 19:27:31 +02:00
committed by GitHub
parent 7186deaf35
commit 9365f5270a

View File

@@ -12,7 +12,14 @@ let platformError;
async function run() {
try {
if (process.platform === "win32") {
const workspaceExists = await fs.access(workspacePath).then(() => true).catch(() => false);
let workspaceExists;
try {
await fs.access(workspacePath);
workspaceExists = true;
} catch {
workspaceExists = false;
}
const workspaceNotEmpty = (await fs.readdir(workspacePath)).length > 0;
if (workspaceExists && workspaceNotEmpty) {