1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-24 08:00:05 -07:00

kiss: remove as_root usage with 'kiss c'

The less of this as_root usage the better.
This commit is contained in:
Dylan Araps 2021-07-02 06:28:18 +00:00
parent a959fcf4a0
commit 09b92d4c64
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

16
kiss
View File

@ -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
;;