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

kiss: remove shellcheck warning from file_owner

This commit is contained in:
Dylan Araps 2020-09-14 12:34:22 +03:00
parent 2fee3837ee
commit d9c8725169
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

9
kiss
View File

@ -51,12 +51,11 @@ as_root() {
} }
file_owner() { file_owner() {
# shellcheck disable=2046 read -r _ _ user _ <<EOF
set -- $(ls -ld "$1") $(ls -ld "$1")
EOF
user=${3:-root} id -u "${user:=root}" >/dev/null 2>&1 || user=root
id -u "$user" >/dev/null 2>&1 || user=root
} }
run_hook() { run_hook() {