diff --git a/packages/aws-cdk/test/integ/helpers/monorepo.ts b/packages/aws-cdk/test/integ/helpers/monorepo.ts index f89c64b96df15..be2a3b682d88f 100644 --- a/packages/aws-cdk/test/integ/helpers/monorepo.ts +++ b/packages/aws-cdk/test/integ/helpers/monorepo.ts @@ -13,10 +13,11 @@ const YARN_MONOREPO_CACHE: Record = {}; */ export async function findYarnPackages(root: string): Promise> { if (!(root in YARN_MONOREPO_CACHE)) { - const output: YarnWorkspacesOutput = JSON.parse(await shell(['yarn', 'workspaces', 'info', '--silent'], { + const json: { data: string } = JSON.parse(await shell(['yarn', 'workspaces', '--json', 'info'], { captureStderr: false, cwd: root, })); + const output: YarnWorkspacesOutput = JSON.parse(json.data); const ret: Record = {}; for (const [k, v] of Object.entries(output)) {