Flutter doctor detect IntelliJ on Mac#6262
Merged
danrubel merged 7 commits intoflutter:masterfrom Oct 13, 2016
Merged
Conversation
devoncarew
reviewed
Oct 12, 2016
| /// Return the absolute path of the user's home directory | ||
| String get homeDirPath { | ||
| if (_homeDirPath == null) { | ||
| _homeDirPath = Platform.environment['HOME'] ?? Platform.environment['USERPROFILE']; |
Contributor
There was a problem hiding this comment.
I think this should be os specific; in windows we'd use USERPROFILE, and on posix HOME.
Contributor
There was a problem hiding this comment.
Perhaps use a ternary expression against the os, or add this as a method in the OperatingSystemUtils class?
Contributor
Author
There was a problem hiding this comment.
Fair enough. Changed to check Platform.isWindows.
devoncarew
reviewed
Oct 12, 2016
|
|
||
| class IntellijValidator extends DoctorValidator { | ||
| IntellijValidator(String title, {this.version, this.pluginsPath}) : super(title); | ||
| abstract class IntellijValidator extends DoctorValidator { |
Contributor
There was a problem hiding this comment.
nit: I would capitalize this IntelliJValidator -
devoncarew
reviewed
Oct 12, 2016
| } | ||
| } | ||
|
|
||
| class IntellijValidatorOnLinux extends IntellijValidator { |
Contributor
There was a problem hiding this comment.
perhaps IntelliJLinuxValidator?
devoncarew
reviewed
Oct 12, 2016
| // ignored | ||
| } | ||
| if (plist != null) { | ||
| int index = plist.indexOf('CFBundleShortVersionString'); |
Contributor
There was a problem hiding this comment.
This could move inside the try-catch - you could avoid the plist != null check.
Contributor
Author
There was a problem hiding this comment.
Good suggestion. Done.
Contributor
|
lgtm w/ a few comments - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A continuation of #6227 so that
flutter doctorcan detect IntelliJ product installations and ensure that the needed plugins are installed on Mac.Platform.environment['HOME']accesses to singlehomeDirPathfunctionFixes #5875 and fixes flutter/flutter-intellij#229.
@Hixie