Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
90f353f9
Unverified
Commit
90f353f9
authored
Mar 04, 2021
by
Jonah Williams
Committed by
GitHub
Mar 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] dont crash when looking for AS4.1 on windows with no LOCALAPPDATA (#77261)
parent
5e62e664
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
android_studio.dart
packages/flutter_tools/lib/src/android/android_studio.dart
+1
-1
android_studio_test.dart
...tools/test/general.shard/android/android_studio_test.dart
+18
-0
No files found.
packages/flutter_tools/lib/src/android/android_studio.dart
View file @
90f353f9
...
...
@@ -346,7 +346,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
}
// 4.1 has a different location for AndroidStudio installs on Windows.
if
(
globals
.
platform
.
isWindows
)
{
if
(
globals
.
platform
.
isWindows
&&
globals
.
platform
.
environment
.
containsKey
(
'LOCALAPPDATA'
)
)
{
final
File
homeDot
=
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
globals
.
platform
.
environment
[
'LOCALAPPDATA'
],
'Google'
,
...
...
packages/flutter_tools/test/general.shard/android/android_studio_test.dart
View file @
90f353f9
...
...
@@ -288,6 +288,24 @@ void main() {
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
testUsingContext
(
'Does not discover Android Studio 4.1 location on Windows if LOCALAPPDATA is null'
,
()
{
windowsFileSystem
.
file
(
r'C:\Users\Dash\AppData\Local\Google\AndroidStudio4.1\.home'
)
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
r'C:\Program Files\AndroidStudio'
);
windowsFileSystem
.
directory
(
r'C:\Program Files\AndroidStudio'
)
.
createSync
(
recursive:
true
);
expect
(
AndroidStudio
.
allInstalled
(),
isEmpty
);
},
overrides:
<
Type
,
Generator
>{
Platform:
()
=>
FakePlatform
(
operatingSystem:
'windows'
,
environment:
<
String
,
String
>{},
// Does not include LOCALAPPDATA
),
FileSystem:
()
=>
windowsFileSystem
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
group
(
'Installation detection on Linux'
,
()
{
FileSystemUtils
fsUtils
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment