diff --git a/packages/cli/cli/src/rerunFernCliAtVersion.ts b/packages/cli/cli/src/rerunFernCliAtVersion.ts index d5de632c9ec..80f77fdb4e0 100644 --- a/packages/cli/cli/src/rerunFernCliAtVersion.ts +++ b/packages/cli/cli/src/rerunFernCliAtVersion.ts @@ -35,7 +35,7 @@ export async function rerunFernCliAtVersion({ [FERN_CWD_ENV_VAR]: process.env[FERN_CWD_ENV_VAR] ?? process.cwd() } }); - if (stdout.includes("code EEXIST") || stderr.includes("code EEXIST")) { + if (stdout?.includes("code EEXIST") || stderr?.includes("code EEXIST")) { // try again if there is a npx conflict return await rerunFernCliAtVersion({ version, diff --git a/packages/cli/cli/versions.yml b/packages/cli/cli/versions.yml index b0ca6772879..7c80c0c0805 100644 --- a/packages/cli/cli/versions.yml +++ b/packages/cli/cli/versions.yml @@ -1,3 +1,11 @@ +- changelogEntry: + - summary: | + Make sure to check for optionality when parsing stdout and stderr in CLI. This + removes the error: `Cannot read properties of undefined (reading 'includes')`. + type: fix + irVersion: 53 + version: 0.42.1 + - changelogEntry: - summary: | If you merge multiple OpenAPI specs with namespaces, `fern check` will no longer