diff --git a/scripts/next-repro-generators/generate-repros.ts b/scripts/next-repro-generators/generate-repros.ts index 1a642dfc22c8..38ac5c94e8a8 100755 --- a/scripts/next-repro-generators/generate-repros.ts +++ b/scripts/next-repro-generators/generate-repros.ts @@ -4,7 +4,7 @@ import { command } from 'execa'; import type { Options as ExecaOptions } from 'execa'; import pLimit from 'p-limit'; import prettyTime from 'pretty-hrtime'; -import { copy, emptyDir, ensureDir, move, rename, writeFile } from 'fs-extra'; +import { copy, emptyDir, ensureDir, move, remove, rename, writeFile } from 'fs-extra'; import { program } from 'commander'; import { AbortController } from 'node-abort-controller'; import { directory } from 'tempy'; @@ -154,6 +154,9 @@ const runGenerators = async ( // Now move the created before dir into it's final location and add storybook await move(createBeforeDir, beforeDir); + // Make sure there are no git projects in the folder + await remove(join(beforeDir, '.git')); + await addStorybook(baseDir, localRegistry, flags); await addDocumentation(baseDir, { name, dirName });