Skip to content

Commit

Permalink
fix: cloning into existing repository
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Nov 14, 2023
1 parent 313ba2f commit 90320e9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cyan/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ StartTemplateWithLambda(async (i, d) => {
const url = await i.text("CookieCutter Git URL");

const tmpPath = d.get("tmpPath", () => `/tmp/cookiecutter/${v4()}`);
if (!fs.existsSync(tmpPath)) fs.mkdirSync(tmpPath, { recursive: true });

await git.clone(url, tmpPath);
if (!fs.existsSync(tmpPath)) {
fs.mkdirSync(tmpPath, { recursive: true });
await git.clone(url, tmpPath);
}

const cookieCutterJson = fs.readFileSync(
`${tmpPath}/cookiecutter.json`,
Expand Down

0 comments on commit 90320e9

Please sign in to comment.