mirror of
https://codeberg.org/muon/home.git
synced 2026-03-08 03:25:16 +00:00
Fix freeze
This commit is contained in:
parent
8307d2dc60
commit
6e7b541d65
1 changed files with 21 additions and 21 deletions
|
|
@ -113,7 +113,7 @@ _hr_freeze() {
|
||||||
uv pip install keyrings.google-artifactregistry-auth==1.1.2 keyring
|
uv pip install keyrings.google-artifactregistry-auth==1.1.2 keyring
|
||||||
|
|
||||||
# Install project dependencies using the subprocess keyring provider
|
# 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
|
# Generate requirements.txt
|
||||||
echo "--extra-index-url ${extra_index_url}" >requirements.txt
|
echo "--extra-index-url ${extra_index_url}" >requirements.txt
|
||||||
|
|
@ -128,18 +128,18 @@ _hr_add_json_field() {
|
||||||
|
|
||||||
# Check if explicit boolean
|
# Check if explicit boolean
|
||||||
if [[ "$value" == "true" || "$value" == "false" ]]; then
|
if [[ "$value" == "true" || "$value" == "false" ]]; then
|
||||||
jq_opt="--argjson"
|
jq_opt="--argjson"
|
||||||
# Check if number (integer or float, no leading zeros unless just 0)
|
# Check if number (integer or float, no leading zeros unless just 0)
|
||||||
elif [[ "$value" =~ ^-?(0|[1-9][0-9]*)(\.[0-9]+)?$ ]]; then
|
elif [[ "$value" =~ ^-?(0|[1-9][0-9]*)(\.[0-9]+)?$ ]]; then
|
||||||
jq_opt="--argjson"
|
jq_opt="--argjson"
|
||||||
# Check if object or array
|
# Check if object or array
|
||||||
elif [[ "$value" == "["* || "$value" == "{"* ]]; then
|
elif [[ "$value" == "["* || "$value" == "{"* ]]; then
|
||||||
if echo "$value" | jq empty >/dev/null 2>&1; then
|
if echo "$value" | jq empty >/dev/null 2>&1; then
|
||||||
jq_opt="--argjson"
|
jq_opt="--argjson"
|
||||||
else
|
else
|
||||||
# Warn to stderr, but proceed as string
|
# Warn to stderr, but proceed as string
|
||||||
echo "Warning: Value for '$key' looks like JSON but is invalid. Treating as string." >&2
|
echo "Warning: Value for '$key' looks like JSON but is invalid. Treating as string." >&2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Apply the value at the path defined by the key (dot-notation supported)
|
# Apply the value at the path defined by the key (dot-notation supported)
|
||||||
|
|
@ -186,8 +186,8 @@ _hr_call() {
|
||||||
if [[ "$1" == -* ]]; then
|
if [[ "$1" == -* ]]; then
|
||||||
local key="${1#-}"
|
local key="${1#-}"
|
||||||
if [[ -z "$2" || "$2" == -* ]]; then
|
if [[ -z "$2" || "$2" == -* ]]; then
|
||||||
echo "Error: Missing value for option $key"
|
echo "Error: Missing value for option $key"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
local value="$2"
|
local value="$2"
|
||||||
|
|
||||||
|
|
@ -230,8 +230,8 @@ _hr_cf() {
|
||||||
if [[ "$1" == -* ]]; then
|
if [[ "$1" == -* ]]; then
|
||||||
local key="${1#-}"
|
local key="${1#-}"
|
||||||
if [[ -z "$2" || "$2" == -* ]]; then
|
if [[ -z "$2" || "$2" == -* ]]; then
|
||||||
echo "Error: Missing value for option $key"
|
echo "Error: Missing value for option $key"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
local value="$2"
|
local value="$2"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue