Skip to content

Commit

Permalink
Use uid not username
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoverbear committed Jan 8, 2024
1 parent 0e5b724 commit 161c1f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ class NixInstallerAction {

private async setup_kvm(): Promise<boolean> {
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 =
Expand Down

0 comments on commit 161c1f6

Please sign in to comment.