diff --git a/src/commands/download/firefox.ts b/src/commands/download/firefox.ts index e23d9e2..6f0773b 100644 --- a/src/commands/download/firefox.ts +++ b/src/commands/download/firefox.ts @@ -127,8 +127,8 @@ export async function downloadInternals({ version, force }: { version: string, f } // If the engine directory is empty, we should delete it. - const engineIsEmpty = await readdir(ENGINE_DIR).then((files) => files.length === 0) - if (existsSync(ENGINE_DIR) && engineIsEmpty) { + const engineIsEmpty = existsSync(ENGINE_DIR) && await readdir(ENGINE_DIR).then((files) => files.length === 0) + if (engineIsEmpty) { log.info("'engine/' is empty, it...") rmSync(ENGINE_DIR, { recursive: true }) }