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 a2097e1 commit ac340b3Copy full SHA for ac340b3
packages/wxt/src/core/initialize.ts
@@ -58,7 +58,9 @@ export async function initialize(options: {
58
59
const isExists = await fs.pathExists(input.directory);
60
if (isExists) {
61
- const isEmpty = (await fs.readdir(input.directory)).length === 0;
+ const isEmpty =
62
+ (await fs.readdir(input.directory)).filter((dir) => dir !== '.git')
63
+ .length === 0;
64
if (!isEmpty) {
65
consola.error(
66
`The directory ${path.resolve(input.directory)} is not empty. Aborted.`,
0 commit comments