fix(git-hangman-lab): repo get-latest - fix URL extraction from list-all output

The awk field parser was using $3 (owner column) instead of $4 (url column).
Also fixed space trimming on extracted URL field.
This commit is contained in:
2026-04-14 19:27:29 +00:00
parent d63f187bf2
commit 0b0f7d2a9f

View File

@@ -276,7 +276,7 @@ do_get_latest() {
# Repo does not exist locally — clone it
echo "Repo not found locally. Looking up URL..."
local url=""
url=$(bash "$SCRIPT_DIR/repo" list-all 2>/dev/null | grep "| $REPO_NAME |" | awk -F'|' '{print $3}' | tr -d ' ')
url=$(bash "$SCRIPT_DIR/repo" list-all 2>/dev/null | grep "| $REPO_NAME |" | awk -F'\\|' '{gsub(/^ +| +$/,"",$4); print $4}')
if [[ -z "$url" ]]; then
echo "Error: repository '$REPO_NAME' not found in list-all output"