Skip to content

Commit

Permalink
fix error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rafinskipg committed Dec 17, 2016
1 parent e980427 commit ee5068b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tasks/lib/get-repo-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var q = require('q');
function cmdDone(deferred, code, stdout, stderr) {
debug('returning git repo url command');
if (code) {
deferred.reject();
deferred.reject("Sorry, you've not configured an origin remote or passed a `repo_url` config value");
} else {
stdout = stdout.replace('\n', '').replace('.git', '');
deferred.resolve(stdout);
Expand Down
4 changes: 2 additions & 2 deletions tasks/lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function getRepoSuccess(deferred, url) {

function getRepoFailure(deferred, err) {
this.message('not remote');
deferred.reject("Sorry, you've not configured an origin remote or passed a `repo_url` config value");
deferred.reject(err);
}

function init(params, loadRC) {
Expand All @@ -43,7 +43,7 @@ function init(params, loadRC) {

module.log('debug', 'Grep commits: ', module.options.grep_commits);

return module.getRepoUrl();
return module.getRepoUrl()
})
.then(getRepoSuccess.bind(this, deferred))
.catch(getRepoFailure.bind(this, deferred));
Expand Down
2 changes: 1 addition & 1 deletion tasks/lib/load-changelog-rc.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function loadChangelogRc() {
deferred.resolve(contents);
}catch(e){
module.log('warn', 'Invalid changelogrc file', e);
return deferred.reject(e);
return deferred.reject('Invalid changelogrc file' + e);
}

})
Expand Down
2 changes: 2 additions & 0 deletions templates/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
<% }) %>
<% } %>
<% }) %>

---
<sub><sup>*Generated with [git-changelog](https:/rafinskipg/git-changelog). If you have any problems or suggestions, create an issue.* :) **Thanks** </sub></sup>

0 comments on commit ee5068b

Please sign in to comment.