mirror of
https://github.com/DeterminateSystems/nix-installer-action.git
synced 2024-11-26 03:08:10 +03:00
Fix logic inversion
This commit is contained in:
parent
161c1f6904
commit
f576e90e2d
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
@ -490,7 +490,7 @@ class NixInstallerAction {
|
|||||||
async setup_kvm() {
|
async setup_kvm() {
|
||||||
const current_user = (0,node_os__WEBPACK_IMPORTED_MODULE_8__.userInfo)();
|
const current_user = (0,node_os__WEBPACK_IMPORTED_MODULE_8__.userInfo)();
|
||||||
const is_root = current_user.uid === 0;
|
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";
|
const kvm_rules = "/etc/udev/rules.d/99-determinate-nix-installer-kvm.rules";
|
||||||
try {
|
try {
|
||||||
const write_file_exit_code = await _actions_exec__WEBPACK_IMPORTED_MODULE_3__.exec("sh", [
|
const write_file_exit_code = await _actions_exec__WEBPACK_IMPORTED_MODULE_3__.exec("sh", [
|
||||||
|
@ -632,7 +632,7 @@ class NixInstallerAction {
|
|||||||
private async setup_kvm(): Promise<boolean> {
|
private async setup_kvm(): Promise<boolean> {
|
||||||
const current_user = userInfo();
|
const current_user = userInfo();
|
||||||
const is_root = current_user.uid === 0;
|
const is_root = current_user.uid === 0;
|
||||||
const maybe_sudo = is_root ? "sudo" : "";
|
const maybe_sudo = is_root ? "" : "sudo";
|
||||||
|
|
||||||
const kvm_rules =
|
const kvm_rules =
|
||||||
"/etc/udev/rules.d/99-determinate-nix-installer-kvm.rules";
|
"/etc/udev/rules.d/99-determinate-nix-installer-kvm.rules";
|
||||||
|
Loading…
Reference in New Issue
Block a user