1
0
mirror of synced 2025-11-08 12:57:47 +00:00

feat(CLI): don't attempt to commit if user.name/email is not set

This commit is contained in:
Jason Dreyzehner
2018-03-10 15:48:13 -05:00
parent abef54a412
commit 58688fc9d9
3 changed files with 38 additions and 5 deletions

View File

@@ -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`);
}