Fix custom-devices error message temporary (#16)
I temporary fixed the error when there isn't a ~/.flutter_custom_devices.json file.
This commit is contained in:
committed by
GitHub
parent
814f470586
commit
c3d029b360
@@ -51,8 +51,7 @@ class ELinuxRemoteDevicesConfig {
|
||||
void ensureFileExists() {
|
||||
if (!_fileSystem.file(_config.configPath).existsSync()) {
|
||||
_config.setValue(_kSchema, _defaultSchema);
|
||||
_config.setValue(_kCustomDevices, <dynamic>[
|
||||
]);
|
||||
_config.setValue(_kCustomDevices, <dynamic>[]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,10 +81,13 @@ class ELinuxRemoteDevicesConfig {
|
||||
try {
|
||||
revived.add(ELinuxRemoteDeviceConfig.fromJson(entry.value));
|
||||
} on ELinuxRemoteDeviceRevivalException catch (e) {
|
||||
final String msg =
|
||||
'Could not load custom device from config index ${entry.key}: $e';
|
||||
_logger.printError(msg);
|
||||
throw ELinuxRemoteDeviceRevivalException(msg);
|
||||
// TODO(hidenori): Corrensponds to the format difference
|
||||
// from the default schema and uncooment here.
|
||||
//
|
||||
//final String msg =
|
||||
// 'Could not load custom device from config index ${entry.key}: $e';
|
||||
//_logger.printError(msg);
|
||||
//throw ELinuxRemoteDeviceRevivalException(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user