Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby): set program.verbose when VERBOSE env var is used #30123

Merged
merged 1 commit into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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