Resolve custom remote copy/exec shellcheck (non-)issues.

remotes/origin/4.10
Darko Poljak 6 years ago
parent 0f31a550cc
commit dcb4395909
  1. 4
      cdist/conf/type/__install_config/files/remote/copy
  2. 5
      cdist/conf/type/__install_config/files/remote/exec

@ -41,6 +41,8 @@ log "@: $*"
log "code: $code"
# copy files into chroot
"$__default_remote_copy" "$code"
# code should be split on spaces
# shellcheck disable=SC2086
"$__default_remote_copy" $code
log "-----"

@ -36,6 +36,7 @@ shift
# escape ' with '"'"'
code="$(echo "$@" | sed -e "s/'/'\"'\"'/g")"
# shellcheck disable=SC2089
code="chroot $chroot sh -e -c '$code'"
log "target_host: $target_host"
@ -44,6 +45,8 @@ log "@: $*"
log "code: $code"
# Run the code
"$__default_remote_exec" "$target_host" "$code"
# code should be split on spaces
# shellcheck disable=SC2086,SC2090
"$__default_remote_exec" "$target_host" $code
log "-----"

Loading…
Cancel
Save