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

[cli strategies] The current working directory is not exactly equal to the git root path #677

Closed
shixy96 opened this issue Oct 6, 2019 · 1 comment

Comments

@shixy96
Copy link
Contributor

shixy96 commented Oct 6, 2019

When the current project is a subproject of the repository, the current working directory is not the root of the git repository. And this will cause the git-cz commit operation caused by the husky hook to fail.

(node:15426) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/repository/sub/.git/COMMIT_EDITMSG'
    at openSync (fs.js:451:3)
    at commit (/Users/repository/sub/node_modules/commitizen/dist/git/commit.js:844:62)
    at dispatchGitCommit (/Users/repository/sub/node_modules/commitizen/dist/commitizen/commit.js:545:19)
    at /Users/repository/sub/node_modules/commitizen/dist/commitizen/commit.js:628:11
    at /Users/repository/sub/node_modules/cz-conventional-changelog/engine.js:216:9
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:15426) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15426) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

This problem is very similar to #187 。By the way, the document was not updated with the bug fixed.
image
I created a pull request for this problem #676 .

@shixy96 shixy96 changed the title [cli] The current working directory is not exactly equal to the git root path [cli strategies] The current working directory is not exactly equal to the git root path Oct 6, 2019
@fgodino
Copy link

fgodino commented Nov 7, 2019

This is much needed

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

No branches or pull requests

2 participants