Skip to content

Commit c6f70dd

Browse files
committed
Apply suggestions from PR
1 parent d4ee023 commit c6f70dd

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ deregister_runner() {
2626
RUNNER_TOKEN=$(echo "${_TOKEN}" | jq -r .token)
2727
fi
2828
./config.sh remove --token "${RUNNER_TOKEN}"
29+
[[ -f "/actions-runner/.runner" ]] && rm -f /actions-runner/.runner
2930
exit
3031
}
3132

@@ -202,9 +203,7 @@ if [[ -n "${_CONFIGURED_ACTIONS_RUNNER_FILES_DIR}" ]]; then
202203
else
203204
echo "Runner reusage is disabled"
204205
if [[ ${_DEBUG_ONLY} == "false" ]]; then
205-
# Make sure there is no remnant runner config, that would break registration
206-
# Cf. https://github.com/myoung34/docker-github-actions-runner/issues/402
207-
rm -f /actions-runner/.runner
206+
[[ -f "/actions-runner/.runner" ]] && rm -f /actions-runner/.runner
208207
configure_runner
209208
fi
210209
fi

0 commit comments

Comments
 (0)