Skip to content

Commit

Permalink
fix: avoid config notfound error
Browse files Browse the repository at this point in the history
  • Loading branch information
uetchy committed Aug 30, 2018
1 parent 395791a commit 01bb921
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 88 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/dist
/.vscode/launch.json
# Created by https://www.gitignore.io/api/node

### Node ###
Expand Down
10 changes: 5 additions & 5 deletions bin/git-account-list
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ program.parse(process.argv)
lib
.loadConfig()
.then(users => {
// users.forEach(user => {
// console.log('\n', chalk.green(`${user.name} <${user.email}>`));
// console.log(chalk.gray(JSON.stringify(user, null, ' ')));
// });
console.log(columnify(users))
if (users.length > 0) {
console.log(columnify(users))
} else {
console.log('no users defined', chalk.green('$ git account add'))
}
})
.catch(err => {
console.log(chalk.red('cannot find config file'), err.message)
Expand Down
Loading

0 comments on commit 01bb921

Please sign in to comment.