patch: fix getuid for ts

This commit is contained in:
Edwin Joassart 2023-12-08 16:28:41 +01:00
parent 8714208762
commit fde8354757

View File

@ -30,7 +30,7 @@ const adapters: Adapter[] = [
// Can't use permissions.isElevated() here as it returns a promise and we need to set
// module.exports = scanner right now.
if (platform !== 'linux' || geteuid() === 0) {
if (platform !== 'linux' || (geteuid && geteuid() === 0)) {
adapters.push(new UsbbootDeviceAdapter());
}