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:
@@ -51,8 +51,7 @@ class ELinuxRemoteDevicesConfig {
|
|||||||
void ensureFileExists() {
|
void ensureFileExists() {
|
||||||
if (!_fileSystem.file(_config.configPath).existsSync()) {
|
if (!_fileSystem.file(_config.configPath).existsSync()) {
|
||||||
_config.setValue(_kSchema, _defaultSchema);
|
_config.setValue(_kSchema, _defaultSchema);
|
||||||
_config.setValue(_kCustomDevices, <dynamic>[
|
_config.setValue(_kCustomDevices, <dynamic>[]);
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,10 +81,13 @@ class ELinuxRemoteDevicesConfig {
|
|||||||
try {
|
try {
|
||||||
revived.add(ELinuxRemoteDeviceConfig.fromJson(entry.value));
|
revived.add(ELinuxRemoteDeviceConfig.fromJson(entry.value));
|
||||||
} on ELinuxRemoteDeviceRevivalException catch (e) {
|
} on ELinuxRemoteDeviceRevivalException catch (e) {
|
||||||
final String msg =
|
// TODO(hidenori): Corrensponds to the format difference
|
||||||
'Could not load custom device from config index ${entry.key}: $e';
|
// from the default schema and uncooment here.
|
||||||
_logger.printError(msg);
|
//
|
||||||
throw ELinuxRemoteDeviceRevivalException(msg);
|
//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