Skip to content
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

Merged
merged 3 commits into from
Dec 14, 2016
Merged

Ci issues with commits #402

merged 3 commits into from
Dec 14, 2016

Conversation

jimthedev
Copy link
Member

Closes #401.

@@ -11,6 +11,7 @@ function log(repoPath, done) {
cwd: repoPath
}, function(error, stdout, stderr) {
if (error) {
throw new Error(error);
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Member Author

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.

Copy link
Member Author

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.
@jimthedev jimthedev merged commit 71731ca into master Dec 14, 2016
jimthedev added a commit that referenced this pull request Dec 19, 2016
* 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
jimthedev added a commit that referenced this pull request Jan 2, 2017
* 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
@LinusU LinusU deleted the ci-issues-with-commits branch January 8, 2017 18:03
@LinusU LinusU restored the ci-issues-with-commits branch January 8, 2017 18:03
Copy link

@plroebuck plroebuck left a 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?

@dmwelch dmwelch deleted the ci-issues-with-commits branch July 27, 2021 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants