mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-28 05:36:34 +00:00
usbboot: Fix linter
Change-type: patch Signed-off-by: Juan Cruz Viotti <juan@balena.io>
This commit is contained in:
parent
dad05b4743
commit
3258807992
@ -449,10 +449,10 @@ class USBBootAdapter extends EventEmitter {
|
|||||||
message: 'LIBUSB_TRANSFER_CANCELLED'
|
message: 'LIBUSB_TRANSFER_CANCELLED'
|
||||||
}, {
|
}, {
|
||||||
message: 'LIBUSB_ERROR_NO_DEVICE'
|
message: 'LIBUSB_ERROR_NO_DEVICE'
|
||||||
}, ((error) => {
|
}, (error) => {
|
||||||
debug(`Swallowed error: ${error.message} ${error.stack}`)
|
debug(`Swallowed error: ${error.message} ${error.stack}`)
|
||||||
return null
|
return null
|
||||||
})).tap((result) => {
|
}).tap((result) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
result.close()
|
result.close()
|
||||||
}
|
}
|
||||||
|
@ -74,9 +74,10 @@ exports.listDevices = () => {
|
|||||||
return device
|
return device
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(devices.map((device) => {
|
console.log(_.map(devices, (device) => {
|
||||||
const descriptor = device.deviceDescriptor
|
const descriptor = device.deviceDescriptor
|
||||||
return `${descriptor.idVendor.toString(16)}:${descriptor.idProduct.toString(16)}`
|
const HEX_BASE = 16
|
||||||
|
return `${descriptor.idVendor.toString(HEX_BASE)}:${descriptor.idProduct.toString(HEX_BASE)}`
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// Include driverless devices into the list of USB devices.
|
// Include driverless devices into the list of USB devices.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user