Skip to content

Commit a667bf9

Browse files
authored
Gracefully handle !isValid in AndroidStudio.gradleExecutable (flutter#9893)
Fixes flutter#9866
1 parent f44ba8b commit a667bf9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/flutter_tools/lib/src/android/android_studio.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ class AndroidStudio implements Comparable<AndroidStudio> {
100100

101101
String get gradlePath => _gradlePath;
102102

103-
String get gradleExecutable => fs.path
104-
.join(_gradlePath, 'bin', platform.isWindows ? 'gradle.bat' : 'gradle');
103+
String get gradleExecutable => isValid
104+
? fs.path.join(_gradlePath, 'bin', platform.isWindows ? 'gradle.bat' : 'gradle')
105+
: null;
105106

106107
String get javaPath => _javaPath;
107108

0 commit comments

Comments
 (0)