use conditional assignment (#9252)
This commit is contained in:
committed by
GitHub
parent
3eb87830e9
commit
8bcf302e23
@@ -286,8 +286,7 @@ class FlutterCommandRunner extends CommandRunner<Null> {
|
||||
engineSourcePath = null;
|
||||
}
|
||||
|
||||
if (engineSourcePath == null)
|
||||
engineSourcePath = _tryEnginePath(fs.path.join(Cache.flutterRoot, '../engine/src'));
|
||||
engineSourcePath ??= _tryEnginePath(fs.path.join(Cache.flutterRoot, '../engine/src'));
|
||||
|
||||
if (engineSourcePath == null) {
|
||||
printError('Unable to detect local Flutter engine build directory.\n'
|
||||
@@ -327,8 +326,7 @@ class FlutterCommandRunner extends CommandRunner<Null> {
|
||||
}
|
||||
|
||||
static void initFlutterRoot() {
|
||||
if (Cache.flutterRoot == null)
|
||||
Cache.flutterRoot = _defaultFlutterRoot;
|
||||
Cache.flutterRoot ??= _defaultFlutterRoot;
|
||||
}
|
||||
|
||||
/// Get all pub packages in the Flutter repo.
|
||||
|
||||
Reference in New Issue
Block a user