feat: blacklist devices by device path (#2345)

We use `devicePath` instead of `device` to blacklist drives using the
`ETCHER_BLACKLISTED_DRIVES` environment variable.

Closes: https://github.com/resin-io/etcher/issues/2264
Change-Type: patch
This commit is contained in:
Benedict Aas 2018-05-16 15:28:10 +01:00 committed by GitHub
parent fb1c381ab7
commit e472fe0276
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,7 +224,7 @@ app.run(($timeout) => {
$timeout(() => { $timeout(() => {
if (BLACKLISTED_DRIVES.length) { if (BLACKLISTED_DRIVES.length) {
const allowedDrives = drives.filter((drive) => { const allowedDrives = drives.filter((drive) => {
return !BLACKLISTED_DRIVES.includes(drive.device) return !BLACKLISTED_DRIVES.includes(drive.devicePath)
}) })
availableDrives.setDrives(allowedDrives) availableDrives.setDrives(allowedDrives)
} else { } else {