File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ check_remote_docker() {
153153
154154 # Check each path until we find one that works
155155 for path in " ${docker_paths[@]} " ; do
156+ # shellcheck disable=SC2029
156157 if ssh " ${SSH_ARGS[@]} " " test -x '${path} ' 2>/dev/null || command -v '${path} '" > /dev/null 2>&1 ; then
157158 REMOTE_DOCKER_CMD=" ${path} "
158159 break
@@ -164,8 +165,10 @@ check_remote_docker() {
164165 error " 'docker' command not found on remote host. Please ensure Docker is installed."
165166 fi
166167 # Check if we need sudo to run docker commands.
168+ # shellcheck disable=SC2029
167169 if ! ssh " ${SSH_ARGS[@]} " " ${REMOTE_DOCKER_CMD} version" > /dev/null 2>&1 ; then
168170 # Check if we're not root and if sudo docker works.
171+ # shellcheck disable=SC2029
169172 if ssh " ${SSH_ARGS[@]} " " [ \$ (id -u) -ne 0 ] && sudo -n ${REMOTE_DOCKER_CMD} version" > /dev/null; then
170173 REMOTE_SUDO=" sudo -n"
171174 else
@@ -435,7 +438,7 @@ cleanup() {
435438 # Stop and remove unregistry container on remote host.
436439 if [[ -n " ${UNREGISTRY_CONTAINER} " ]]; then
437440 # shellcheck disable=SC2029
438- ssh " ${SSH_ARGS[@]} " " ${REMOTE_SUDO} docker rm -f ${UNREGISTRY_CONTAINER} " > /dev/null 2>&1 || true
441+ ssh " ${SSH_ARGS[@]} " " ${REMOTE_SUDO} ${REMOTE_DOCKER_CMD} rm -f ${UNREGISTRY_CONTAINER} " > /dev/null 2>&1 || true
439442 fi
440443
441444 # Terminate the shared SSH connection if it was established.
You can’t perform that action at this time.
0 commit comments