diff --git a/packages/nx/src/tasks-runner/run-command.ts b/packages/nx/src/tasks-runner/run-command.ts index fa6a8b911b016..c3046f6c5f5c6 100644 --- a/packages/nx/src/tasks-runner/run-command.ts +++ b/packages/nx/src/tasks-runner/run-command.ts @@ -292,7 +292,7 @@ function constructLifeCycles(lifeCycle: LifeCycle) { const lifeCycles = [] as LifeCycle[]; lifeCycles.push(new StoreRunInformationLifeCycle()); lifeCycles.push(lifeCycle); - if (process.env.NX_PERF_LOGGING) { + if (process.env.NX_PERF_LOGGING === 'true') { lifeCycles.push(new TaskTimingsLifeCycle()); } if (process.env.NX_PROFILE) { diff --git a/packages/nx/src/utils/perf-logging.ts b/packages/nx/src/utils/perf-logging.ts index b0f93215566a7..0393017ada204 100644 --- a/packages/nx/src/utils/perf-logging.ts +++ b/packages/nx/src/utils/perf-logging.ts @@ -1,6 +1,6 @@ import { PerformanceObserver } from 'perf_hooks'; -if (process.env.NX_PERF_LOGGING) { +if (process.env.NX_PERF_LOGGING === 'true') { const obs = new PerformanceObserver((list) => { for (const entry of list.getEntries()) { console.log(`Time for '${entry.name}'`, entry.duration); diff --git a/packages/workspace/src/utils/perf-logging.ts b/packages/workspace/src/utils/perf-logging.ts index ce3b8cbc63781..482593b3209e8 100644 --- a/packages/workspace/src/utils/perf-logging.ts +++ b/packages/workspace/src/utils/perf-logging.ts @@ -1,6 +1,6 @@ import { PerformanceObserver } from 'perf_hooks'; -if (process.env.NX_PERF_LOGGING) { +if (process.env.NX_PERF_LOGGING === 'true') { const obs = new PerformanceObserver((list) => { const entry = list.getEntries()[0]; console.log(`Time for '${entry.name}'`, entry.duration);