Fallback to process.cwd() when PWD is not present (#24677)

Fixes #24582 - Error running yarn dev command
This commit is contained in:
Zoltán Bedi 2020-05-14 13:36:25 +02:00 committed by GitHub
parent 77148ef616
commit 660f2b4e99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ let includeInternalScripts = false;
const isLinkedMode = () => {
// In circleci we are in linked mode. Detect by using the circle working directory,
// rather than the present working directory.
const pwd = process.env.CIRCLE_WORKING_DIRECTORY || process.env.PWD;
const pwd = process.env.CIRCLE_WORKING_DIRECTORY || process.env.PWD || process.cwd();
if (path.basename(pwd) === 'grafana-toolkit') {
return true;