From 8509cf2622c0f761d790506d7332cb423cb727be Mon Sep 17 00:00:00 2001 From: trivernis Date: Fri, 16 Jun 2023 12:41:26 +0200 Subject: [PATCH] Fix check for run as root --- pacman-update-check.nu | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pacman-update-check.nu b/pacman-update-check.nu index 8e126bf..90f26b6 100755 --- a/pacman-update-check.nu +++ b/pacman-update-check.nu @@ -6,15 +6,9 @@ use cntfy.nu def main [ --ntfy: bool ] { - if is-admin == false { - let span = (metadata main).span; - err make { + if ( is-admin ) == false { + error make { msg: "This script needs to be run as root" - label: { - text: "Run as root" - start: $label.start - end: $label.end - } } } let updates = ( checkupdates | split row "\n" )