From fde83547573cae9bfb4b5a3ff05bbeb02070d8e9 Mon Sep 17 00:00:00 2001 From: Edwin Joassart Date: Fri, 8 Dec 2023 16:28:41 +0100 Subject: [PATCH] patch: fix getuid for ts --- lib/util/drive-scanner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/drive-scanner.ts b/lib/util/drive-scanner.ts index 84a1af3f..49ff0441 100644 --- a/lib/util/drive-scanner.ts +++ b/lib/util/drive-scanner.ts @@ -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()); }