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): exit findUp methods if parent dir equals current dir #28801

Conversation

byCedric
Copy link
Member

Why

Fixes #28799

How

Determining if the current cwd is the root of a drive was hardcoded, and not correct for Windows. On windows, the root is something like C:\ or D:\, which also cannot be hardcoded.

Instead, it now relies on path.dirname(cwd), if that equals the current cwd it stops. It basically means that we can't go one up anymore.

Test Plan

Checklist

@byCedric byCedric requested a review from EvanBacon as a code owner May 13, 2024 13:00
Copy link

linear bot commented May 13, 2024

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label May 13, 2024
@byCedric byCedric changed the title fix(cli): exit findFileInParents if parent dir equals current dir fix(cli): exit findUp methods if parent dir equals current dir May 13, 2024
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels May 13, 2024
@byCedric byCedric merged commit 261fc12 into main May 14, 2024
12 checks passed
@byCedric byCedric deleted the cedric/eng-12313-npx-expo-lint-gives-a-maximum-call-stack-size-exceeded branch May 14, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint compatible bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

npx expo lint gives a maximum call stack size exceeded
2 participants