fix: correct doas wrapper for nh clean all

This commit is contained in:
Youwen Wu 2025-01-18 14:58:33 -08:00
parent 39c39ce433
commit 6214e63261
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -27,8 +27,10 @@
body = '' body = ''
if count $argv > /dev/null if count $argv > /dev/null
set subcommand (string join " " $argv) set subcommand (string join " " $argv)
if contains -- $subcommand "os switch" "os test" "os boot" "clean all" if contains -- $subcommand "os switch" "os test" "os boot"
doas ${pkgs.nh}/bin/nh $argv -R doas ${pkgs.nh}/bin/nh $argv -R
else if contains -- $subcommand "clean all"
doas ${pkgs.nh}/bin/nh $argv
else else
${pkgs.nh}/bin/nh $argv ${pkgs.nh}/bin/nh $argv
end end