Skip to content

Commit ff7d46e

Browse files
GatsbyJS Botpieh
GatsbyJS Bot
andauthoredMar 9, 2021
fix(gatsby): set program.verbose when VERBOSE env var is used (#30123) (#30138)
(cherry picked from commit 632f915) Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed
 

‎packages/gatsby/src/commands/build.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ interface IBuildArgs extends IProgram {
6161
}
6262

6363
module.exports = async function build(program: IBuildArgs): Promise<void> {
64-
report.setVerbose(isTruthy(process.env.VERBOSE) || program.verbose)
64+
if (isTruthy(process.env.VERBOSE)) {
65+
program.verbose = true
66+
}
67+
report.setVerbose(program.verbose)
6568

6669
if (program.profile) {
6770
report.warn(

‎packages/gatsby/src/commands/develop-process.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ const openDebuggerPort = (debugInfo: IDebugInfo): void => {
8181
}
8282

8383
module.exports = async (program: IDevelopArgs): Promise<void> => {
84-
reporter.setVerbose(isTruthy(process.env.VERBOSE) || program.verbose)
84+
if (isTruthy(process.env.VERBOSE)) {
85+
program.verbose = true
86+
}
87+
reporter.setVerbose(program.verbose)
8588

8689
if (program.debugInfo) {
8790
openDebuggerPort(program.debugInfo)

0 commit comments

Comments
 (0)
Please sign in to comment.