Skip to content

Commit

Permalink
fix(gatsby): set program.verbose when VERBOSE env var is used (#30123)
Browse files Browse the repository at this point in the history
(cherry picked from commit 632f915)
  • Loading branch information
pieh authored and vladar committed Mar 9, 2021
1 parent 043a025 commit 74cc2bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/gatsby/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ import {
import { updateSiteMetadata, isTruthy } from "gatsby-core-utils"

module.exports = async function build(program: IBuildArgs): Promise<void> {
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(
Expand Down
5 changes: 4 additions & 1 deletion packages/gatsby/src/commands/develop-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ const openDebuggerPort = (debugInfo: IDebugInfo): void => {
}

module.exports = async (program: IDevelopArgs): Promise<void> => {
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)
Expand Down

0 comments on commit 74cc2bc

Please sign in to comment.