Fix freeze

This commit is contained in:
Sage 2026-01-21 16:41:09 +00:00
parent 8307d2dc60
commit 6e7b541d65

View file

@ -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)
@ -186,8 +186,8 @@ _hr_call() {
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"
@ -230,8 +230,8 @@ _hr_cf() {
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"