From fb2814c3a27ea3ab4d7b618ac1bed86f2dba6ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Mon, 14 May 2018 12:45:21 +0200 Subject: [PATCH] Improve HOTRELOAD mounting logic --- hack/tfw.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hack/tfw.sh b/hack/tfw.sh index 37073da..a3b61ed 100755 --- a/hack/tfw.sh +++ b/hack/tfw.sh @@ -92,13 +92,14 @@ build_test_withfrontend() run_test() { cd "$TAO_PATH" - mount_baseimage="-v ${BASEIMAGE_PATH}/lib/tfw:/usr/local/lib/tfw" - mount_test="-v $TEST_PATH/solvable/src:/srv/.tfw" - mount_volumes="" - [ "${HOTRELOAD:-0}" == "1" ] && mount_volumes="${mount_baseimage} ${mount_test}" + if [ "${HOTRELOAD:-0}" == "1" ]; then + [ -d "$BASEIMAGE_PATH" ] && mount_baseimage="-v ${BASEIMAGE_PATH}/lib/tfw:/usr/local/lib/tfw" + mount_test="-v ${TEST_PATH}/solvable/src:/srv/.tfw" + mount_volumes="${mount_baseimage:-} ${mount_test}" + fi docker run --rm \ -p $TEST_PORT:$TEST_PORT \ - ${mount_volumes} \ + ${mount_volumes:-} \ ${@:-} \ -e AVATAO_SECRET=$AVATAO_SECRET $IMAGE_NAME }