From de7de5eab8ed4fe6f03aa61a587baab8f0de24fc Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Fri, 8 Sep 2023 15:38:37 -0600 Subject: [PATCH] fix: skip if --json flag present --- src/hooks/prerun.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hooks/prerun.ts b/src/hooks/prerun.ts index 92edd787..a6c994cc 100644 --- a/src/hooks/prerun.ts +++ b/src/hooks/prerun.ts @@ -9,6 +9,7 @@ import { Hook, ux } from '@oclif/core'; // eslint-disable-next-line @typescript-eslint/require-await const hook: Hook.Prerun = async function ({ Command, config }) { + if (process.argv.includes('--json')) return; const { plugin } = Command; if (!plugin) return; if (plugin.type === 'link') return;