fix: update .env loading comments and adjust default path handling for runners
This commit is contained in:
@@ -16,7 +16,7 @@ RUNNERS_CONF="${PROJECT_ROOT}/runners.conf"
|
|||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
source "${PROJECT_ROOT}/lib/common.sh"
|
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
|
load_env
|
||||||
|
|
||||||
# Colors — only emit ANSI escapes when stdout is a terminal (not piped/redirected)
|
# 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
|
fi
|
||||||
if [[ -z "$path_default" ]]; then
|
if [[ -z "$path_default" ]]; then
|
||||||
if [[ "$r_type" == "native" ]]; 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
|
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
|
||||||
fi
|
fi
|
||||||
prompt_field "data_path" "absolute path for runner data" "runner_path" "$path_default"
|
prompt_field "data_path" "absolute path for runner data" "runner_path" "$path_default"
|
||||||
|
|||||||
Reference in New Issue
Block a user