aboutsummaryrefslogtreecommitdiff
path: root/ci/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-05-30 07:56:56 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-05-30 08:32:33 -0400
commitfa2ffe87f794caa74f80c1c2d6e6067ee4849632 (patch)
tree30c6392a3ea61f0597ce9cff550a298a03b8e463 /ci/test
parentfac2eeeb9d718bdb892eef9adf333ea61ba8f3d0 (diff)
downloadbitcoin-fa2ffe87f794caa74f80c1c2d6e6067ee4849632.tar.xz
ci: Deduplicate DOCKER_EXEC
Diffstat (limited to 'ci/test')
-rwxr-xr-xci/test/04_install.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh
index 14ab943d68..8be0d5646d 100755
--- a/ci/test/04_install.sh
+++ b/ci/test/04_install.sh
@@ -48,16 +48,14 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
--env-file /tmp/env \
--name $CONTAINER_NAME \
$DOCKER_NAME_TAG)
-
- DOCKER_EXEC () {
- docker exec $DOCKER_ID bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*"
- }
+ export DOCKER_CI_CMD_PREFIX="docker exec $DOCKER_ID"
else
echo "Running on host system without docker wrapper"
- DOCKER_EXEC () {
- bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*"
- }
fi
+
+DOCKER_EXEC () {
+ $DOCKER_CI_CMD_PREFIX bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*"
+}
export -f DOCKER_EXEC
if [ -n "$DPKG_ADD_ARCH" ]; then