fix: update .env loading comments and adjust default path handling for runners

This commit is contained in:
S
2026-03-02 08:12:31 -05:00
parent 2a993b07df
commit 5c60d321ab

View File

@@ -16,7 +16,7 @@ RUNNERS_CONF="${PROJECT_ROOT}/runners.conf"
# shellcheck disable=SC1091
source "${PROJECT_ROOT}/lib/common.sh"
# Load .env for defaults (RUNNER_DEFAULT_IMAGE, RUNNER_DATA_BASE_PATH, etc.)
# Load .env for defaults (RUNNER_DEFAULT_IMAGE, etc.)
load_env
# Colors — only emit ANSI escapes when stdout is a terminal (not piped/redirected)
@@ -404,9 +404,12 @@ for ((i = 0; i < runner_count; i++)); do
fi
if [[ -z "$path_default" ]]; then
if [[ "$r_type" == "native" ]]; then
path_default="${LOCAL_RUNNER_DATA_BASE_PATH:-~/gitea-runner}/${r_name}"
# shellcheck disable=SC2088 # tilde intentionally stored as literal (expanded at runtime)
path_default="~/gitea-runner/${r_name}"
elif [[ "$r_host" == "fedora" ]]; then
path_default="${FEDORA_GITEA_DATA_PATH:-/mnt/nvme/gitea}/runner/${r_name}"
else
path_default="${RUNNER_DATA_BASE_PATH:-/mnt/nvme/gitea-runner}/${r_name}"
path_default="${UNRAID_GITEA_DATA_PATH:-/mnt/nvme/gitea}/runner/${r_name}"
fi
fi
prompt_field "data_path" "absolute path for runner data" "runner_path" "$path_default"