Skip to content

Commit

Permalink
feat: useful error message for user
Browse files Browse the repository at this point in the history
  • Loading branch information
hotoo committed Mar 2, 2017
1 parent ff1394a commit 52925c7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/openrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,15 @@ function openrc(uri) {
});
return result;
} catch (ex) {
console.error('Read .gitopenrc error: %s', ex.message);
console.error('Read %s error: %s', gitopenrc, ex.message);
process.exit(1);
return 1;
return {};
}
} else {
console.error('Not found gitopenrc file: %s', gitopenrc);
console.error('Please read [Configuration](https://github.com/hotoo/gitopen#configuration) for more information.');
process.exit(1);
return {};
}
}

Expand Down
9 changes: 9 additions & 0 deletions gitopenrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
gitlab.alibaba-inc.com:
type: gitlab
protocol: http
gitlab-oss.alibaba-inc.com:
type: gitlab
protocol: http
gitlab.alipay-inc.com:
type: gitlab
protocol: http

0 comments on commit 52925c7

Please sign in to comment.