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(cli): try to resolve Cannot read properties of undefined (reading 'includes') error #4675

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/cli/src/rerunFernCliAtVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels like the only recent additions to the CLI that use includes

if (stdout?.includes("code EEXIST") || stderr?.includes("code EEXIST")) {
// try again if there is a npx conflict
return await rerunFernCliAtVersion({
version,
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/cli/versions.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading