-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ci issues with commits #402
Conversation
* master: chore(ci): add node versions and say git version in ci
@@ -11,6 +11,7 @@ function log(repoPath, done) { | |||
cwd: repoPath | |||
}, function(error, stdout, stderr) { | |||
if (error) { | |||
throw new Error(error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't error
already an Error
-instance? Maybe just throw error
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, this makes the line below (done();
) unreachable since a throw
interrupts the execution of the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it already is an instance of Error. I'll change that.
The reason I decided to throw here is that this is actually fatal. If we can't do git log, we can't check if the commit worked and the process needs to throw so that our tests can return the correct error code and output an actual error to stderr. It is only used in test and was silently failing in the previous configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we could certainly benefit from re-writing the codebase to use (err, cb) style 😸
Instead of creating a new error instance, this uses the existing error instance and just throws it.
* master: docs(install): Add documentation for installing and running locally (#300) fix(tests): fix tests when a global config is present (#405) test(adapter): add test for scoped npm modules fix(adapter): add support for scoped adapters docs: Add cz-emoji to tools list (#404) feat(commit): use OS-specific cache dir for commitizen.json instead of home-or-tmp (#400) fix(npmignore): ignore more unnecessary files (#393) docs: add vscode-commitizen to tools list (#397) Ci issues with commits (#402) chore(ci): add node versions and say git version in ci docs: replace sudo mention with link to how to fix EACCES error
* master: fix(package): "main" property within "package.json" (#409) style: Add linting using eslint (#406) ci(appveyor): remove appveyor on finish script ci(appveyor): disable collection of artifacts ci(tests): on windows run tests as node4/npm3 ci(travis): update semantic-release to 6.3.5 and update travis config chore(package): update nyc to version 10.0.0 (#392) docs(install): Add documentation for installing and running locally (#300) fix(tests): fix tests when a global config is present (#405) test(adapter): add test for scoped npm modules fix(adapter): add support for scoped adapters docs: Add cz-emoji to tools list (#404) feat(commit): use OS-specific cache dir for commitizen.json instead of home-or-tmp (#400) fix(npmignore): ignore more unnecessary files (#393) docs: add vscode-commitizen to tools list (#397) Ci issues with commits (#402) chore(ci): add node versions and say git version in ci docs: replace sudo mention with link to how to fix EACCES error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does CONTRIBUTING.md contain text about Atom-related Gotchas?
Closes #401.