From c3d029b360166e0034782e758a0cbda8aae7a9eb Mon Sep 17 00:00:00 2001 From: Hidenori Matsubayashi Date: Wed, 21 Jul 2021 16:57:01 +0900 Subject: [PATCH] Fix custom-devices error message temporary (#16) I temporary fixed the error when there isn't a ~/.flutter_custom_devices.json file. --- lib/elinux_remote_devices_config.dart | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/elinux_remote_devices_config.dart b/lib/elinux_remote_devices_config.dart index 610d88e..5a5e2f7 100644 --- a/lib/elinux_remote_devices_config.dart +++ b/lib/elinux_remote_devices_config.dart @@ -51,8 +51,7 @@ class ELinuxRemoteDevicesConfig { void ensureFileExists() { if (!_fileSystem.file(_config.configPath).existsSync()) { _config.setValue(_kSchema, _defaultSchema); - _config.setValue(_kCustomDevices, [ - ]); + _config.setValue(_kCustomDevices, []); } } @@ -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); } }