From 6e7b541d65501f413ce25add6600f8cdf95a9ad5 Mon Sep 17 00:00:00 2001 From: Sage Date: Wed, 21 Jan 2026 16:41:09 +0000 Subject: [PATCH] Fix freeze --- modules/home/terminal/hr/hr.sh | 42 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/modules/home/terminal/hr/hr.sh b/modules/home/terminal/hr/hr.sh index 37df0f0..7cdffca 100644 --- a/modules/home/terminal/hr/hr.sh +++ b/modules/home/terminal/hr/hr.sh @@ -113,7 +113,7 @@ _hr_freeze() { uv pip install keyrings.google-artifactregistry-auth==1.1.2 keyring # Install project dependencies using the subprocess keyring provider - uv pip install --no-cache -e .[test] --extra-index-url "${extra_index_url}" --keyring-provider subprocess + uv pip install --no-cache -e ".[test]" --extra-index-url "${extra_index_url}" --keyring-provider subprocess # Generate requirements.txt echo "--extra-index-url ${extra_index_url}" >requirements.txt @@ -128,18 +128,18 @@ _hr_add_json_field() { # Check if explicit boolean if [[ "$value" == "true" || "$value" == "false" ]]; then - jq_opt="--argjson" + jq_opt="--argjson" # Check if number (integer or float, no leading zeros unless just 0) elif [[ "$value" =~ ^-?(0|[1-9][0-9]*)(\.[0-9]+)?$ ]]; then - jq_opt="--argjson" + jq_opt="--argjson" # Check if object or array elif [[ "$value" == "["* || "$value" == "{"* ]]; then - if echo "$value" | jq empty >/dev/null 2>&1; then - jq_opt="--argjson" - else - # Warn to stderr, but proceed as string - echo "Warning: Value for '$key' looks like JSON but is invalid. Treating as string." >&2 - fi + if echo "$value" | jq empty >/dev/null 2>&1; then + jq_opt="--argjson" + else + # Warn to stderr, but proceed as string + echo "Warning: Value for '$key' looks like JSON but is invalid. Treating as string." >&2 + fi fi # Apply the value at the path defined by the key (dot-notation supported) @@ -181,16 +181,16 @@ _hr_call() { fi local json_payload="{}" - + while [[ $# -gt 0 ]]; do if [[ "$1" == -* ]]; then local key="${1#-}" if [[ -z "$2" || "$2" == -* ]]; then - echo "Error: Missing value for option $key" - return 1 + echo "Error: Missing value for option $key" + return 1 fi local value="$2" - + json_payload=$(_hr_add_json_field "$json_payload" "$key" "$value") shift 2 else @@ -200,10 +200,10 @@ _hr_call() { done local url="https://${service_name}-${project_number}.europe-west1.run.app${url_path}" - + echo "Calling $url..." echo "$json_payload" - + curl "$url" \ -H "Authorization: bearer $(gcloud auth print-identity-token)" \ -H "Content-Type: application/json" \ @@ -225,16 +225,16 @@ _hr_cf() { fi local json_payload="{}" - + while [[ $# -gt 0 ]]; do if [[ "$1" == -* ]]; then local key="${1#-}" if [[ -z "$2" || "$2" == -* ]]; then - echo "Error: Missing value for option $key" - return 1 + echo "Error: Missing value for option $key" + return 1 fi local value="$2" - + json_payload=$(_hr_add_json_field "$json_payload" "$key" "$value") shift 2 else @@ -244,10 +244,10 @@ _hr_cf() { done local url="https://europe-west1-${PROJECT_ID}.cloudfunctions.net/${function_name}" - + echo "Calling $url..." echo "$json_payload" - + curl "$url" \ -H "Authorization: bearer $(gcloud auth print-identity-token)" \ -H "Content-Type: application/json" \