-
Notifications
You must be signed in to change notification settings - Fork 561
Closed
Description
I have a project with the following configuration on my machine:
- globally-installed commitizen with
.czrcin~using cz-conventional-changelog - main repo. with package.json set up to use
cz-conventional-changelog - a submodule that contains a non-node project (no package.json file)
in the main repo, git cz works as one would expect. however, if you try to do work in the submodule director, and run git cz it fails with a path error:
/Users/<username>/.nvm/versions/node/v6.6.0/lib/node_modules/commitizen/dist/commitizen/adapter.js:192
throw error;
^
Error: Could not resolve /Users/<username>/Development/path/to/repo/submodule/node_modules/cz-conventional-changelog. Cannot find module '/Users/<username>/Development/path/to/repo/submodule/node_modules/cz-conventional-changelog'
It's trying to find an install directly in the submodule for some reason. I would have expected it to use the global install, or the installation referenced one directory up (as a submodule of a project that is commitizen-friendly).
As a test, I checked out the same submodule in a separate directory, and git cz worked as expected.
Is there something that would prevent submodules from working like nested directories when using git cz?
AKclown
Metadata
Metadata
Assignees
Labels
No labels