From c5dbe6fbee49757e70d32210b5cd015343260e23 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 2 Dec 2020 17:59:40 +0000 Subject: [PATCH] Only mkdir/copy if it hasn't been done --- test/test.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test.bats b/test/test.bats index 4d554ea..38a8290 100644 --- a/test/test.bats +++ b/test/test.bats @@ -16,8 +16,8 @@ EXAMPLE_MISSPELLING_COUNT=5 export RUNNER_TEMP="/foo/runner_temp" # Simulate the Dockerfile COPY command -sudo mkdir /code/ -sudo cp codespell-problem-matcher/codespell-matcher.json /code/ +[ -d "/code/" ] || sudo mkdir /code/ +[ -f "/code/codespell-matcher.json" ] || sudo cp codespell-problem-matcher/codespell-matcher.json /code/ # This function runs before every test function setup() {