Skip to content
Snippets Groups Projects
Commit 25b0cd41 authored by sh4869's avatar sh4869 Committed by Kathy Walrath
Browse files

Use git user name for author name

closes #304
parent d10172ad
No related branches found
No related tags found
No related merge requests found
......@@ -13,3 +13,4 @@ Guillermo López-Anglada <guillermo.lopez@outlook.com>
ntaoo <ntaoo.g@gmail.com>
Andrés Araujo <a.araujo.azua@gmail.com>
Kevin Segaud <segaud.kevin@gmail.com>
sh4869 <nobuk4869@gmail.com>
......@@ -167,6 +167,14 @@ additional analytics to help us improve Stagehand [y/yes/no]? """);
String author = options['author'];
if (!options.wasParsed('author')) {
try {
io.ProcessResult result =
io.Process.runSync('git', ['config', 'user.name']);
if (result.exitCode == 0) author = result.stdout.trim();
} catch (exception) {}
}
Map vars = {'author': author};
Future f = generator.generate(projectName, target, additionalVars: vars);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment