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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user