mirror of
https://github.com/github/awesome-copilot.git
synced 2026-05-06 15:12:12 +00:00
This commit is contained in:
@@ -137,7 +137,15 @@ def _normalize_services(services):
|
||||
if isinstance(svc.get("details"), str):
|
||||
svc["details"] = [svc["details"]]
|
||||
if isinstance(svc.get("private"), str):
|
||||
svc["private"] = bool(svc["private"])
|
||||
val = svc["private"].lower()
|
||||
if val in ("true", "1", "yes", "on"):
|
||||
svc["private"] = True
|
||||
elif val in ("false", "0", "no", "off"):
|
||||
svc["private"] = False
|
||||
else:
|
||||
# Log warning for invalid values
|
||||
print(f"WARNING: Invalid boolean value '{svc['private']}' for 'private' field. Defaulting to False.", file=sys.stderr)
|
||||
svc["private"] = False
|
||||
return services
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user