From 6b859904150e3f53a4dd4ebf16bc4c10bd1b291c Mon Sep 17 00:00:00 2001 From: sebthom Date: Sat, 1 Jul 2023 13:56:53 +0200 Subject: [PATCH] treat backticks in config yaml template as literals --- image/run.sh | 1 + image/run_runner.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/image/run.sh b/image/run.sh index c72eea8..03a45ba 100644 --- a/image/run.sh +++ b/image/run.sh @@ -95,6 +95,7 @@ if [ -n "${GITEA_RUNNER_GID:-}" ]; then fi fi + ################################################################# # check if act user has read/write access to /var/run/docker.sock ################################################################# diff --git a/image/run_runner.sh b/image/run_runner.sh index 0733c1b..a938979 100644 --- a/image/run_runner.sh +++ b/image/run_runner.sh @@ -42,6 +42,7 @@ if [[ ${GITEA_RUNNER_LOG_EFFECTIVE_CONFIG:-false} == "true" ]]; then echo "===========================================================" while IFS= read -r line; do line=${line//\"/\\\"} # escape double quotes + line=${line//\`/\\\`} # escape backticks eval "echo \"$line\"" | tee -a "$effective_config_file" done < $GITEA_RUNNER_CONFIG_TEMPLATE_FILE echo "==========================================================="