We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd63f57 commit cca44f3Copy full SHA for cca44f3
packages/api/cli/src/electron-forge-init.ts
@@ -1,4 +1,4 @@
1
-import fs from 'node:fs/promises';
+import fs from 'node:fs';
2
3
import { api, InitOptions } from '@electron-forge/core';
4
import { confirm, select } from '@inquirer/prompts';
@@ -58,7 +58,8 @@ program
58
59
if (
60
typeof initOpts.dir === 'string' &&
61
- (await fs.readdir(initOpts.dir)).length > 0
+ fs.existsSync(initOpts.dir) &&
62
+ (await fs.promises.readdir(initOpts.dir)).length > 0
63
) {
64
const confirmResult = await prompt.run(confirm, {
65
message: `${chalk.cyan(initOpts.dir)} is not empty. Would you like to continue and overwrite existing files?`,
0 commit comments