Skip to content

Commit

Permalink
chore: improve CWD warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
eartharoid committed Jan 13, 2024
1 parent a349b0e commit f126a6d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ const base_dir = path.resolve(path.join(__dirname, '../'));
const cwd = path.resolve(process.cwd());
if (base_dir !== cwd) {
console.log('\x07' + colours.yellowBright('Warning: The current working directory is not the same as the base directory.'));
console.log(colours.yellowBright('This may result in unexpected behaviour, particularly with missing environment variables.'));
console.log(' Base directory: ' + colours.gray(base_dir));
console.log(' CWD: ' + colours.gray(cwd));
if (!process.env.DOCKER) {
console.log(colours.yellowBright('This may result in unexpected behaviour, particularly with missing environment variables.'));
}
console.log(' Base directory: ' + colours.gray(base_dir));
console.log(' Current directory: ' + colours.gray(cwd));
console.log(colours.blueBright(' Learn more at https://lnk.earth/dt-cwd.'));
}

Expand Down

0 comments on commit f126a6d

Please sign in to comment.