Skip to content

Commit 28710b9

Browse files
committed
ref(shellcheck): Fix more offenses
1 parent 32c3fa2 commit 28710b9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

assets/runtime/functions.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SELF_MANAGED_BLOCK_STRING="## cdalvaro managed block"
1616
#----------------------------------------------------------------------------------------------------------------------
1717
function exec_as_salt() {
1818
if [[ $(whoami) == "${SALT_USER}" ]]; then
19-
$@
19+
"$@"
2020
else
2121
sudo -HEu "${SALT_USER}" "$@"
2222
fi
@@ -110,7 +110,8 @@ function update_template() {
110110
(
111111
export "${VARIABLES[@]}"
112112
local IFS=":"
113-
sudo -HEu "${USR}" envsubst "${VARIABLES[*]/#/$}" <"${tmp_file}" | sudo tee "${FILE}"
113+
# shellcheck disable=SC2024
114+
sudo -HEu "${USR}" envsubst "${VARIABLES[*]/#/$}" <"${tmp_file}" >"${FILE}"
114115
)
115116

116117
rm -f "${tmp_file}"
@@ -556,6 +557,7 @@ function configure_salt_minion() {
556557

557558
# Get master's fingerprint
558559
log_info " ==> Getting master's fingerprint ..."
560+
# shellcheck disable=SC2034
559561
SALT_MASTER_FINGERPRINT="$(salt-key -f master.pub | grep -Ei 'master.pub: ([^\s]+)' | awk '{print $2}')"
560562

561563
# Update main configuration
@@ -786,7 +788,7 @@ function install_python_additional_packages() {
786788

787789
if [[ -n "${PYTHON_PACKAGES}" ]]; then
788790
IFS=" " read -ra PYTHON_PACKAGES <<<"${PYTHON_PACKAGES}"
789-
log_info "Installing additional python packages: ${PYTHON_PACKAGES[@]} ..."
791+
log_info "Installing additional python packages: ${PYTHON_PACKAGES[*]} ..."
790792
salt-pip install --no-cache-dir "${PYTHON_PACKAGES[@]}"
791793
return $?
792794
fi

0 commit comments

Comments
 (0)