From 8821bbabb2b41a6ba8aba10c11451d4ab8ead3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gijs=20Rog=C3=A9?= Date: Fri, 15 May 2020 14:41:46 +0200 Subject: [PATCH] fixes #174 use process.env.INIT_CWD (#175) use process.env.INIT_CWD instead of process.env.PWD as this is set by NPM and Yarn regardless of the OS your are running. --- lib/gulp/configs.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/gulp/configs.js b/lib/gulp/configs.js index 96ce37e..a15b951 100644 --- a/lib/gulp/configs.js +++ b/lib/gulp/configs.js @@ -10,8 +10,8 @@ function getConfig(path) { function watchConfigPaths(paths, name, cwd) { const dirs = [cwd]; - if (cwd !== process.env.PWD) { - dirs.push(process.env.PWD); + if (cwd !== process.env.INIT_CWD) { + dirs.push(process.env.INIT_CWD); } dirs.forEach(dir => { @@ -63,7 +63,7 @@ async function configs() { // Get the default config from the buildozer package const baseConfig = getConfig(require.resolve('./../../lib/.buildozerrc')); // Merge default config with the config of the current dir if present - const config = [processConfig({...baseConfig, ...getConfig(process.env.PWD)}, process.env.PWD)]; + const config = [processConfig({...baseConfig, ...getConfig(process.env.INIT_CWD)}, process.env.INIT_CWD)]; // Search for configs if config_search is enabled if (config[0].config_search.enabled) {