Don't fail when sourcing /etc/profile

This commit is contained in:
Pedro Algarvio 2019-11-07 12:12:31 +00:00
parent 1180463c34
commit 9b0ef8094a
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF

View file

@ -6808,14 +6808,18 @@ install_macosx_git() {
}
install_macosx_stable_post() {
if [ ! -f /etc/paths.d/salt ]; then
print "%s\n" "/opt/salt/bin" "/usr/local/sbin" > /etc/paths.d/salt
fi
if [ ! -f /etc/paths.d/salt ]; then
print "%s\n" "/opt/salt/bin" "/usr/local/sbin" > /etc/paths.d/salt
fi
# shellcheck disable=SC1091
. /etc/profile
# Don'f fail because of unknown variable on the next step
set +o nounset
# shellcheck disable=SC1091
. /etc/profile
# Revert nounset to it's previous state
set -o nounset
return 0
return 0
}
install_macosx_git_post() {