Merge branch 'fix/type/__pyvenv/group-explorer' into 'master'

__pyvenv: Fix group explorer

See merge request ungleich-public/cdist!998
This commit is contained in:
poljakowski 2021-06-10 06:37:21 +02:00
commit 02aa88463a

View file

@ -14,6 +14,11 @@ then
then
printf '%u\n' "${group_gid}"
else
printf '%s\n' "$(id -u -n "${group_gid}")"
if command -v getent >/dev/null 2>&1
then
getent group "${group_gid}" | cut -d : -f 1
else
awk -F: -v gid="${group_gid}" '$3 == gid { print $1 }' /etc/group
fi
fi
fi