diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-30 06:26:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-30 06:26:58 -0500 |
commit | 735b16e34721449781f82b10555b15e4aead0deb (patch) | |
tree | 6ddb00570c65636070df2db978f672acd80b1972 /hack/get_ci_vm.sh | |
parent | 2686e406a650f8ceac4b3763e0cfba16090d1c1b (diff) | |
parent | bfc1b66be1f2717e997a84fc33386cf621525208 (diff) | |
download | podman-735b16e34721449781f82b10555b15e4aead0deb.tar.gz podman-735b16e34721449781f82b10555b15e4aead0deb.tar.bz2 podman-735b16e34721449781f82b10555b15e4aead0deb.zip |
Merge pull request #9063 from cevich/master_fix_validate
Cirrus: Fix running Validate task on branches
Diffstat (limited to 'hack/get_ci_vm.sh')
-rwxr-xr-x | hack/get_ci_vm.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/hack/get_ci_vm.sh b/hack/get_ci_vm.sh index d1e38eb35..4f6c42a06 100755 --- a/hack/get_ci_vm.sh +++ b/hack/get_ci_vm.sh @@ -157,11 +157,14 @@ parse_args(){ VM_IMAGE_NAME="$1" - # Word-splitting is desirable in this case - # shellcheck disable=SC2207 + # Word-splitting is desirable in this case. + # Values are used literally (with '=') as args to future `env` command. + # get_env_vars() will take care of properly quoting it's output. + # shellcheck disable=SC2207,SC2191 ENVS=( $(get_env_vars) - "VM_IMAGE_NAME=$VM_IMAGE_NAME" + VM_IMAGE_NAME="$VM_IMAGE_NAME" + UPSTREAM_REMOTE="upstream" ) VMNAME="${VMNAME:-${USER}-${VM_IMAGE_NAME}}" @@ -263,7 +266,7 @@ echo -e "Note: Script can be re-used in another terminal if needed." echo -e "${RED}(option to delete VM presented upon exiting).${NOR}" # TODO: This is fairly fragile, specifically the quoting for the remote command. echo '#!/bin/bash' > $TMPDIR/ssh -echo "$SSH_CMD -- -t 'cd $GOSRC && exec env \"${ENVS[*]}\" bash -il'" >> $TMPDIR/ssh +echo "$SSH_CMD -- -t 'cd $GOSRC && exec env ${ENVS[*]} bash -il'" >> $TMPDIR/ssh chmod +x $TMPDIR/ssh showrun $TMPDIR/ssh |