create-astro 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -253,8 +253,13 @@ ${bold(
|
|
|
253
253
|
if (args.dryRun) {
|
|
254
254
|
ora().info(dim(`--dry-run enabled, skipping.`));
|
|
255
255
|
} else if (gitResponse) {
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
const gitDir = "./.git";
|
|
257
|
+
if (fs.existsSync(gitDir)) {
|
|
258
|
+
ora().info(dim("A .git directory already exists. Skipping creating a new Git repository."));
|
|
259
|
+
} else {
|
|
260
|
+
await execaCommand("git init", { cwd });
|
|
261
|
+
ora().succeed("Git repository created!");
|
|
262
|
+
}
|
|
258
263
|
} else {
|
|
259
264
|
await info(
|
|
260
265
|
"Sounds good!",
|