From 09b92d4c649974d2804aeb32262f763610ca4093 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 2 Jul 2021 06:28:18 +0000 Subject: [PATCH] kiss: remove as_root usage with 'kiss c' The less of this as_root usage the better. --- kiss | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/kiss b/kiss index 59a9fcb..9dd4232 100755 --- a/kiss +++ b/kiss @@ -1551,20 +1551,8 @@ args() { continue } - # False positive ('>> file' with no command). - # shellcheck disable=2188 - printf '%s\n' "$sums" | - - if 2>/dev/null >> "$repo_dir/checksums"; then - tee "$repo_dir/checksums" - - else - log "$pkg" "Need permissions to generate checksums" - file_owner "$repo_dir" - - user=$user as_root tee "$repo_dir/checksums" - fi - + printf '%s\n' "$sums" + printf '%s\n' "$sums" > "$repo_dir/checksums" log "$pkg" "Generated checksums" done ;;