From 493f73c406a060761ff3d57d6b35130e3dc7f0c0 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Wed, 25 Sep 2019 02:43:21 +0900 Subject: [PATCH] fix: avoid #29 --- entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 912b781..5ab717d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -62,8 +62,9 @@ local_dir="${HOME}/$(tr -cd 'a-f0-9' < /dev/urandom | head -c 32)" if git clone --depth=1 --single-branch --branch "${remote_branch}" "${remote_repo}" "${local_dir}"; then cd "${local_dir}" - print_info "Keeping existing files: ${INPUT_KEEPFILES}" - if [[ ${INPUT_KEEPFILES} != "true" ]]; then + if [[ ${INPUT_KEEPFILES} == "true" ]]; then + print_info "Keeping existing files: ${INPUT_KEEPFILES}" + else git rm -r --ignore-unmatch '*' fi