mirror of
https://github.com/Minionguyjpro/Inno-Setup-Action
synced 2026-02-18 17:41:18 +01:00
src/index.js: Another fix
This commit is contained in:
@@ -12,7 +12,14 @@ let platformError;
|
|||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
if (process.platform === "win32") {
|
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;
|
const workspaceNotEmpty = (await fs.readdir(workspacePath)).length > 0;
|
||||||
|
|
||||||
if (workspaceExists && workspaceNotEmpty) {
|
if (workspaceExists && workspaceNotEmpty) {
|
||||||
|
|||||||
Reference in New Issue
Block a user