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
#30138)

(cherry picked from commit 632f915)

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
  • Loading branch information
GatsbyJS Bot and pieh committed Mar 9, 2021
1 parent 123e47c commit ff7d46e
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
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
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 ff7d46e

Please sign in to comment.