Repository navigation
Fix plugins path - #57684
Fix plugins path#57684firephreek wants to merge 5 commits into
Conversation
…nstalled via Jetbrains Toolbox.
Found this spot also setting the plugins path. Not sure where or why there are two.
Removed references to `global.fs` in tests to remove issues with `fs` object being shared across Windows and Linux 'platforms', causing tests to break.
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
|
@googlebot I fixed it. |
christopherfujino
left a comment
There was a problem hiding this comment.
I also notice that this PR still failed the CLA check. I can see the commits are authored with [email protected], did you by any chance sign the CLA with a different e-mail?
|
|
||
| // The plugins path is different when installed via Jetbrains Toolbox | ||
| String pluginsPath; | ||
| if(globals.fs.isDirectorySync(installPath + '.plugins')){ |
There was a problem hiding this comment.
I'm thinking we can make this change more resilient by moving this logic to the pluginsPath getter, which starts at line 131 in this file.
| fs.file(homeFile).writeAsStringSync(installPath); | ||
| final AndroidStudio studio = | ||
| AndroidStudio.fromHomeDot(globals.fs.directory(studioHome)); | ||
| AndroidStudio.fromHomeDot(fs.directory(studioHome)); |
There was a problem hiding this comment.
I know this was wrong before your change, but while you're at it, can you fix the indentation here?
|
Hey @firephreek thanks so much for filing this PR. However, because this code keeps breaking, I think we're going to deprecate these plugins validators. More context in this comment. But thanks again for contributing! |
Description
When Android Studio is installed via on Windows via JetBrains Toolbox, the path to the plugins folder is different. This causes issues with (at least) flutter doctor. These commits reconcile that by checking for a '.plugins' folder corresponding to a Toolbox install and using that. Additionally, tests were updated to resolve conflicts with the fs stub being used across groups.
Related Issues
Addresses issue #57642
Tests
I added the following tests:
flutter\packages\flutter_tools\test\general.shard\android\android_studio_test.dartChecklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.