From b9f9968f8412211e48e3daf6eea5916118f4230c Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Mon, 1 Oct 2018 17:46:06 +0200 Subject: [PATCH] fix(GUI): Warn when requiring usb fails Change-type: patch Signed-off-by: Alexis Svinartchouk --- lib/sdk/adapters/usbboot/usb.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/sdk/adapters/usbboot/usb.js b/lib/sdk/adapters/usbboot/usb.js index 6e3bc98f..1e70c118 100644 --- a/lib/sdk/adapters/usbboot/usb.js +++ b/lib/sdk/adapters/usbboot/usb.js @@ -18,6 +18,7 @@ const _ = require('lodash') const Bluebird = require('bluebird') +const analytics = require('../../../gui/app/modules/analytics') // The USB module calls `libusb_init`, which will fail // if the device we're running in has no USB controller @@ -28,6 +29,7 @@ const usb = (() => { try { return require('usb') } catch (error) { + analytics.logException(error) return { getDeviceList: _.constant([]) }