Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cli/scripts/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,18 @@ def validate_spock_pg_compat(spock_ver: str = None, pg_ver: str = None) -> None:
Also supports shorthand Spock strings:
– "50" → "5.0.0", "40" → "4.0.0", etc.
"""
# 0) Fill in defaults if user didn’t pass anything
# 0) Fill in defaults if user didn’t pass anything
if not pg_ver:
pg_ver = DEFAULT_PG
else:
pg_ver = str(pg_ver) # ← force to string

if not spock_ver:
maj = int(pg_ver.split(".", 1)[0])
spock_ver = DEFAULT_SPOCK_17 if maj == 17 else DEFAULT_SPOCK
else:
spock_ver = str(spock_ver) # ← force to string


# 0.5) Normalize two-digit shorthand (e.g. "50" → "5.0.0")
m = re.fullmatch(r'(\d)(\d)$', spock_ver)
Expand Down Expand Up @@ -4455,4 +4461,3 @@ def check_directory_status(directory):
REPO = get_value("GLOBAL", "REPO")



Loading