Skip to content

Commit 625c95d

Browse files
Patrick McElhaneyLinusU
Patrick McElhaney
authored andcommitted
fix(adapter): allows git cz to be run from subdirectories (#292)
looks for the adapter file relative to the project root rather than cwd closes #187
1 parent 0d70197 commit 625c95d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commitizen/adapter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function resolveAdapterPath(inboundAdapterPath) {
131131

132132
// Resolve from process.cwd() if inboundAdapterPath is a path
133133
let absoluteAdapterPath = isPath ?
134-
path.resolve(process.cwd(), inboundAdapterPath) :
134+
path.resolve(getNearestProjectRootDirectory(), inboundAdapterPath) :
135135
inboundAdapterPath;
136136

137137
try {

0 commit comments

Comments
 (0)