feat(CLI): don't attempt to commit if user.name/email is not set
This commit is contained in:
@@ -144,8 +144,11 @@ export async function typescriptStarter(
|
||||
await tasks.install(install, runner, projectPath);
|
||||
|
||||
const spinner7 = ora(`Initializing git repository`).start();
|
||||
await tasks.initialCommit(commitHash, projectPath);
|
||||
spinner7.succeed();
|
||||
(await tasks.initialCommit(commitHash, projectPath, gitName, gitEmail))
|
||||
? spinner7.succeed()
|
||||
: spinner7.fail(
|
||||
"Git config user.name and user.email are not configured. You'll need to `git commit` yourself."
|
||||
);
|
||||
|
||||
console.log(`\n${chalk.blue.bold(`Created ${name} 🎉`)}\n`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user