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 committed Mar 9, 2021
1 parent 37079ab commit 5e92447
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 @@ -61,7 +61,10 @@ interface IBuildArgs extends IProgram {
}

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 @@ -81,7 +81,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 5e92447

Please sign in to comment.