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

Detect Flutter SDK location relative to Dart SDK #3045

Merged
merged 2 commits into from
Jul 19, 2021

Conversation

jonasfj
Copy link
Member

@jonasfj jonasfj commented Jul 15, 2021

Fix #2307, tested on Windows and Linux using a few hacks.

If the Dart SDK is present inside the Flutter SDK in sub-folder
bin/cache/dart-sdk/, then we no-longer require the environment
variable FLUTTER_ROOT to be specified. Instead we simply derive
the location of the Flutter SDK from the location of the Dart SDK.

We still allow the environment variable FLUTTER_ROOT to override
the otherwise automatically detected Flutter SDK location.

If the Dart SDK is present inside the Flutter SDK in sub-folder
`bin/cache/dart-sdk/`, then we no-longer require the environment
variable `FLUTTER_ROOT` to be specified. Instead we simply derive
the location of the Flutter SDK from the location of the Dart SDK.

We still allow the environment variable `FLUTTER_ROOT` to override
the otherwise automatically detected Flutter SDK location.
@jonasfj jonasfj requested a review from natebosch July 15, 2021 14:29
@google-cla google-cla bot added the cla: yes label Jul 15, 2021
@jonasfj
Copy link
Member Author

jonasfj commented Jul 15, 2021

@natebosch feel free to unassign review if you're busy, I'm just a little short on reviewers this summer 🌞

lib/src/sdk/flutter.dart Show resolved Hide resolved
lib/src/sdk/flutter.dart Show resolved Hide resolved
@jonasfj jonasfj requested a review from natebosch July 16, 2021 12:57
@jonasfj jonasfj merged commit 70b1a4f into dart-lang:master Jul 19, 2021
@jonasfj jonasfj deleted the flutter-sdk-detection branch July 19, 2021 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make the logic to locate the Flutter SDK more robust
2 participants