No longer require sudo #64

Merged
Hoverbear merged 3 commits from hoverbear/fh-156-installer-action-shouldnt-require-sudo into main 2024-01-09 17:50:39 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit f576e90e2d - Show all commits

2
dist/index.js generated vendored
View file

@ -490,7 +490,7 @@ class NixInstallerAction {
async setup_kvm() {
const current_user = (0,node_os__WEBPACK_IMPORTED_MODULE_8__.userInfo)();
const is_root = current_user.uid === 0;
const maybe_sudo = is_root ? "sudo" : "";
const maybe_sudo = is_root ? "" : "sudo";
const kvm_rules = "/etc/udev/rules.d/99-determinate-nix-installer-kvm.rules";
try {
const write_file_exit_code = await _actions_exec__WEBPACK_IMPORTED_MODULE_3__.exec("sh", [

View file

@ -632,7 +632,7 @@ class NixInstallerAction {
private async setup_kvm(): Promise<boolean> {
const current_user = userInfo();
const is_root = current_user.uid === 0;
const maybe_sudo = is_root ? "sudo" : "";
const maybe_sudo = is_root ? "" : "sudo";
const kvm_rules =
"/etc/udev/rules.d/99-determinate-nix-installer-kvm.rules";