From 4318d3de6399f3e4b5307842a7377c89fb2322c3 Mon Sep 17 00:00:00 2001 From: Patrick McElhaney Date: Sat, 23 Jul 2016 21:06:43 -0400 Subject: [PATCH] fix(adapter): allows git cz to be run from subdirectories looks for the adapter file relative to the project root rather than cwd closes #187 --- src/commitizen/adapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commitizen/adapter.js b/src/commitizen/adapter.js index 7d7eff70..c93c5803 100644 --- a/src/commitizen/adapter.js +++ b/src/commitizen/adapter.js @@ -131,7 +131,7 @@ function resolveAdapterPath(inboundAdapterPath) { // Resolve from process.cwd() if inboundAdapterPath is a path let absoluteAdapterPath = isPath ? - path.resolve(process.cwd(), inboundAdapterPath) : + path.resolve(getNearestProjectRootDirectory(), inboundAdapterPath) : inboundAdapterPath; try {