mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
CI: only enable why-is-node-running in GHA debug logging mode
This commit is contained in:
@@ -30,6 +30,7 @@ import { createSpan, printTraceResult, whyIsNodeRunning } from './trace';
|
||||
import { buildDeprecateFiles } from './build-deprecate-files';
|
||||
import path from 'node:path';
|
||||
import { ROOT_DIR } from './constants/dir';
|
||||
import { isCI } from 'ci-info';
|
||||
|
||||
process.on('uncaughtException', (error) => {
|
||||
console.error('Uncaught exception:', error);
|
||||
@@ -69,7 +70,10 @@ const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
|
||||
}
|
||||
|
||||
try {
|
||||
await import('why-is-node-running');
|
||||
// only enable why-is-node-running in GitHub Actions debug mode
|
||||
if (isCI && process.env.RUNNER_DEBUG === '1') {
|
||||
await import('why-is-node-running');
|
||||
}
|
||||
|
||||
const downloadPreviousBuildPromise = downloadPreviousBuild(rootSpan);
|
||||
const buildCommonPromise = downloadPreviousBuildPromise.then(() => buildCommon(rootSpan));
|
||||
|
||||
Reference in New Issue
Block a user