diff --git a/dist/index.js b/dist/index.js index 5072918..37902ae 100644 --- a/dist/index.js +++ b/dist/index.js @@ -489,7 +489,7 @@ class NixInstallerAction { } async setup_kvm() { const current_user = (0,node_os__WEBPACK_IMPORTED_MODULE_8__.userInfo)(); - const is_root = current_user.username === "root"; + const is_root = current_user.uid === 0; const maybe_sudo = is_root ? "sudo" : ""; const kvm_rules = "/etc/udev/rules.d/99-determinate-nix-installer-kvm.rules"; try { diff --git a/src/main.ts b/src/main.ts index 358134b..443b6d6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -631,7 +631,7 @@ class NixInstallerAction { private async setup_kvm(): Promise { const current_user = userInfo(); - const is_root = current_user.username === "root"; + const is_root = current_user.uid === 0; const maybe_sudo = is_root ? "sudo" : ""; const kvm_rules =