mirror of
https://github.com/casjaysdevdocker/gitea
synced 2026-08-14 14:01:17 -04:00
🐛 Fix UUOC and missing grep guard in start-runners 🐛
Replaced `echo "$SERVER_ADDRESS" | grep -q '://'` with the native bash `[[ "$SERVER_ADDRESS" != *"://"* ]]` test, eliminating a useless subshell/pipe and the missing `--` before the grep pattern that came with it. Found by the `script-lint` agent while auditing the act_runner cache-server integration. - rootfs/usr/local/bin/start-runners: line 24 UUOC fix - TODO.AI.md: marked the start-runners lint finding fixed; logged a new, separate line-length violation on line 36 (`RUNNER_LABELS` default is 781 chars) discovered during the same lint pass but not yet actioned
This commit is contained in:
@@ -21,7 +21,7 @@ trap __cleanup SIGTERM SIGINT
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Validate required environment variables
|
||||
if [ -n "$SERVER_ADDRESS" ]; then
|
||||
if ! echo "$SERVER_ADDRESS" | grep -q '://'; then
|
||||
if [[ "$SERVER_ADDRESS" != *"://"* ]]; then
|
||||
SERVER_ADDRESS="http://$SERVER_ADDRESS"
|
||||
fi
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user