Resolve custom remote copy/exec shellcheck (non-)issues.
This commit is contained in:
parent
0f31a550cc
commit
dcb4395909
2 changed files with 7 additions and 2 deletions
|
@ -41,6 +41,8 @@ log "@: $*"
|
||||||
log "code: $code"
|
log "code: $code"
|
||||||
|
|
||||||
# copy files into chroot
|
# copy files into chroot
|
||||||
"$__default_remote_copy" "$code"
|
# code should be split on spaces
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
"$__default_remote_copy" $code
|
||||||
|
|
||||||
log "-----"
|
log "-----"
|
||||||
|
|
|
@ -36,6 +36,7 @@ shift
|
||||||
|
|
||||||
# escape ' with '"'"'
|
# escape ' with '"'"'
|
||||||
code="$(echo "$@" | sed -e "s/'/'\"'\"'/g")"
|
code="$(echo "$@" | sed -e "s/'/'\"'\"'/g")"
|
||||||
|
# shellcheck disable=SC2089
|
||||||
code="chroot $chroot sh -e -c '$code'"
|
code="chroot $chroot sh -e -c '$code'"
|
||||||
|
|
||||||
log "target_host: $target_host"
|
log "target_host: $target_host"
|
||||||
|
@ -44,6 +45,8 @@ log "@: $*"
|
||||||
log "code: $code"
|
log "code: $code"
|
||||||
|
|
||||||
# Run the 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 "-----"
|
log "-----"
|
||||||
|
|
Loading…
Reference in a new issue