Skip to content

Commit

Permalink
fixes #174 use process.env.INIT_CWD (#175)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gijsroge committed May 15, 2020
1 parent e561bdc commit 8821bba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/gulp/configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 8821bba

Please # to comment.