From 83398c0a73dfa8cd986af126cfed664778d5f85d Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Tue, 9 Mar 2021 10:27:14 +0100 Subject: [PATCH] fix(gatsby): set program.verbose when VERBOSE env var is used --- packages/gatsby/src/commands/build.ts | 5 ++++- packages/gatsby/src/commands/develop-process.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/gatsby/src/commands/build.ts b/packages/gatsby/src/commands/build.ts index 8bdc30b3e87b6..30ab3b6f370de 100644 --- a/packages/gatsby/src/commands/build.ts +++ b/packages/gatsby/src/commands/build.ts @@ -46,7 +46,10 @@ import { import { updateSiteMetadata, isTruthy } from "gatsby-core-utils" module.exports = async function build(program: IBuildArgs): Promise { - report.setVerbose(isTruthy(process.env.VERBOSE) || program.verbose) + if (isTruthy(process.env.VERBOSE)) { + program.verbose = true + } + report.setVerbose(program.verbose) if (program.profile) { report.warn( diff --git a/packages/gatsby/src/commands/develop-process.ts b/packages/gatsby/src/commands/develop-process.ts index 42f138d8a2376..ea523cfb84251 100644 --- a/packages/gatsby/src/commands/develop-process.ts +++ b/packages/gatsby/src/commands/develop-process.ts @@ -80,7 +80,10 @@ const openDebuggerPort = (debugInfo: IDebugInfo): void => { } module.exports = async (program: IDevelopArgs): Promise => { - reporter.setVerbose(isTruthy(process.env.VERBOSE) || program.verbose) + if (isTruthy(process.env.VERBOSE)) { + program.verbose = true + } + reporter.setVerbose(program.verbose) if (program.debugInfo) { openDebuggerPort(program.debugInfo)