From 6294ce20eccaa6540dc31f06d6fa27796b7e3b33 Mon Sep 17 00:00:00 2001 From: Brian Xie Date: Mon, 15 May 2023 15:41:55 +0800 Subject: [PATCH] fix: set find config "home: true" --- lib/read-config-file.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/read-config-file.js b/lib/read-config-file.js index 45e4c0e..7b5d55b 100755 --- a/lib/read-config-file.js +++ b/lib/read-config-file.js @@ -6,15 +6,14 @@ const log = require('./logger'); const readConfigFile = (CZ_CONFIG_NAME = '.cz-config.js') => { // First try to find the .cz-config.js config file - // It seems like find-config still locates config files in the home directory despite of the home:false prop. - const czConfig = findConfig.require(CZ_CONFIG_NAME, { home: false }); + const czConfig = findConfig.require(CZ_CONFIG_NAME, { home: true }); if (czConfig) { return czConfig; } // fallback to locating it using the config block in the nearest package.json - let pkg = findConfig('package.json', { home: false }); + let pkg = findConfig('package.json', { home: true }); if (pkg) { const pkgDir = path.dirname(pkg);