-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
First of all: nice work!
Second, if the user hasn't previously saved their github user id then your generator throws 'Uncaught, unspecified "error" event.' This happens because getUsername() in src/generators/shared/shell.es6 rejects its promise if "git config --get user.githubuser" returns non-zero, which it will if user.githubuser has never been saved.
I suggest just returning "resolve('')" instead.
diff --git a/generators/shared/shell.js b/generators/shared/shell.js
index 2eb601d..25aca7c 100644
--- a/generators/shared/shell.js
+++ b/generators/shared/shell.js
@@ -26,7 +26,7 @@ function getUsername() {
_shelljs2.default.exec('git config --get user.githubuser', { silent: true }, (code, stdout, stderr) => {
if (code !== 0) {
- return reject(stderr);
+ return resolve('');
}
return resolve(stdout.trim());
});
Metadata
Metadata
Assignees
Labels
No labels