From f126a6d4a341964f1a4b54df70001dc084ec5b5a Mon Sep 17 00:00:00 2001 From: Isaac Date: Sat, 13 Jan 2024 01:45:09 +0000 Subject: [PATCH] chore: improve CWD warning message --- src/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index dc77ec8..128803f 100644 --- a/src/index.js +++ b/src/index.js @@ -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.')); }