mirror of
https://github.com/flutter/flutter
synced 2024-09-19 08:11:56 +00:00
Only access globals.deviceManager if actually setting something (#111461)
This commit is contained in:
parent
b84bfa3526
commit
836c16efc0
|
@ -256,7 +256,10 @@ class FlutterCommandRunner extends CommandRunner<void> {
|
|||
}
|
||||
|
||||
// See if the user specified a specific device.
|
||||
globals.deviceManager?.specifiedDeviceId = topLevelResults['device-id'] as String?;
|
||||
final String? specifiedDeviceId = topLevelResults['device-id'] as String?;
|
||||
if (specifiedDeviceId != null) {
|
||||
globals.deviceManager?.specifiedDeviceId = specifiedDeviceId;
|
||||
}
|
||||
|
||||
if ((topLevelResults['version'] as bool?) ?? false) {
|
||||
globals.flutterUsage.sendCommand('version');
|
||||
|
|
Loading…
Reference in a new issue