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-cli): make --inspect-brk work #34242

Merged
merged 2 commits into from Dec 14, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/gatsby-cli/src/create-cli.ts
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`)) {
iChenLei marked this conversation as resolved.
Show resolved Hide resolved
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