Skip to content

Commit 977a211

Browse files
authored
fix(gatsby-cli): preserve verbosity in spawned child processes (#36399)
1 parent 03157e8 commit 977a211

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/gatsby-cli/src/reporter/reporter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
registerAdditionalDiagnosticOutputHandler,
2424
AdditionalDiagnosticsOutputHandler,
2525
} from "./redux/diagnostics"
26+
import { isTruthy } from "gatsby-core-utils/is-truthy"
2627

2728
const errorFormatter = getErrorFormatter()
2829
const tracer = globalTracer()
@@ -35,7 +36,7 @@ export interface IActivityArgs {
3536
tags?: { [key: string]: any }
3637
}
3738

38-
let isVerbose = false
39+
let isVerbose = isTruthy(process.env.GATSBY_REPORTER_ISVERBOSE)
3940

4041
function isLogIntentMessage(msg: any): msg is ILogIntent {
4142
return msg && msg.type === `LOG_INTENT`
@@ -74,6 +75,7 @@ class Reporter {
7475
*/
7576
setVerbose = (_isVerbose: boolean = true): void => {
7677
isVerbose = _isVerbose
78+
process.env.GATSBY_REPORTER_ISVERBOSE = isVerbose ? `1` : `0`
7779
}
7880

7981
/**

0 commit comments

Comments
 (0)