Skip to content

Commit

Permalink
fix(gatsby-cli): make --inspect-brk work (#34242) (#34254)
Browse files Browse the repository at this point in the history
Co-authored-by: Ward Peeters <ward@coding-tech.com>
Co-authored-by: Lei Chen <chenleicoder@foxmail.com>
  • Loading branch information
3 people authored Dec 14, 2021
1 parent 97d23ae commit 7a432a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/gatsby-cli/src/create-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ function buildLocalCommands(cli: yargs.Argv, isLocalSite: boolean): void {
(args: yargs.Arguments, cmd: (args: yargs.Arguments) => unknown) => {
process.env.NODE_ENV = process.env.NODE_ENV || `development`

if (args.hasOwnProperty(`inspect`)) {
if (Object.prototype.hasOwnProperty.call(args, `inspect`)) {
args.inspect = args.inspect || 9229
}
if (args.hasOwnProperty(`inspect-brk`)) {
args.inspect = args.inspect || 9229
if (Object.prototype.hasOwnProperty.call(args, `inspect-brk`)) {
args.inspectBrk = args[`inspect-brk`] || 9229
}

cmd(args)
Expand Down

0 comments on commit 7a432a8

Please sign in to comment.