mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 11:16:39 +00:00
Merge pull request #2495 from resin-io/fix-analytics-in-sdk
Add 'debug' in place of 'logException'
This commit is contained in:
commit
941b5c9e45
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
const _ = require('lodash')
|
const _ = require('lodash')
|
||||||
const Bluebird = require('bluebird')
|
const Bluebird = require('bluebird')
|
||||||
const analytics = require('../../../gui/app/modules/analytics')
|
const debug = require('debug')('etcher:sdk:usbboot')
|
||||||
|
|
||||||
// The USB module calls `libusb_init`, which will fail
|
// The USB module calls `libusb_init`, which will fail
|
||||||
// if the device we're running in has no USB controller
|
// if the device we're running in has no USB controller
|
||||||
@ -29,7 +29,7 @@ const usb = (() => {
|
|||||||
try {
|
try {
|
||||||
return require('usb')
|
return require('usb')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
analytics.logException(error)
|
debug('Couldn\'t require "usb". Reason: ', error.message, error.stack)
|
||||||
return {
|
return {
|
||||||
getDeviceList: _.constant([])
|
getDeviceList: _.constant([])
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user