diff --git a/packages/gatsby/src/commands/build.ts b/packages/gatsby/src/commands/build.ts index 5c9b112297c5c..2c2d156dd36a8 100644 --- a/packages/gatsby/src/commands/build.ts +++ b/packages/gatsby/src/commands/build.ts @@ -38,7 +38,7 @@ import { markWebpackStatusAsPending, markWebpackStatusAsDone, } from "../utils/webpack-status" -import { updateSiteMetadata } from "gatsby-core-utils" +import { updateSiteMetadata, isTruthy } from "gatsby-core-utils" let cachedPageData let cachedWebpackCompilationHash @@ -61,7 +61,7 @@ interface IBuildArgs extends IProgram { } module.exports = async function build(program: IBuildArgs): Promise { - report.setVerbose(program.verbose) + report.setVerbose(isTruthy(process.env.VERBOSE) || 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 1309e711fe468..7935edc0c38e3 100644 --- a/packages/gatsby/src/commands/develop-process.ts +++ b/packages/gatsby/src/commands/develop-process.ts @@ -2,6 +2,7 @@ import { syncStaticDir } from "../utils/get-static-dir" import reporter from "gatsby-cli/lib/reporter" import chalk from "chalk" import telemetry from "gatsby-telemetry" +import { isTruthy } from "gatsby-core-utils" import express from "express" import inspector from "inspector" import { initTracer } from "../utils/tracer" @@ -80,7 +81,7 @@ const openDebuggerPort = (debugInfo: IDebugInfo): void => { } module.exports = async (program: IDevelopArgs): Promise => { - reporter.setVerbose(program.verbose) + reporter.setVerbose(isTruthy(process.env.VERBOSE) || program.verbose) if (program.debugInfo) { openDebuggerPort(program.debugInfo)