feat: Add exceptions for shellcheck

This commit is contained in:
Carlos Álvaro
2020-05-16 18:51:34 +02:00
parent ea627f04f9
commit 3f019825ef
6 changed files with 122 additions and 86 deletions

View File

@@ -5,9 +5,9 @@ set -e
# Execute a command as SALT_USER
function exec_as_salt()
{
if [[ $(whoami) == ${SALT_USER} ]]; then
if [[ $(whoami) == "${SALT_USER}" ]]; then
$@
else
sudo -HEu ${SALT_USER} "$@"
sudo -HEu "${SALT_USER}" "$@"
fi
}