Fix M8 foundation: dry-run exception handling, GUI close race, registry API, contract serialization, semver parser
This commit is contained in:
@@ -433,26 +433,27 @@ def _cmd_registry_publish(args):
|
||||
config_yaml, readme=readme, defaults=defaults,
|
||||
dry_run=True,
|
||||
)
|
||||
errors = result.get("errors") or []
|
||||
warnings = result.get("warnings") or []
|
||||
if errors:
|
||||
print(f"Preflight errors ({len(errors)}):")
|
||||
for err in errors:
|
||||
print(f" ERROR: {err}")
|
||||
if warnings:
|
||||
print(f"Preflight warnings ({len(warnings)}):")
|
||||
for warn in warnings:
|
||||
print(f" WARN: {warn}")
|
||||
if not errors and not warnings:
|
||||
print("Registry preflight passed.")
|
||||
return 0 if not errors else 1
|
||||
except Exception as e:
|
||||
print(f"Registry preflight unavailable: {e}")
|
||||
print("Proceeding with local validation only.")
|
||||
else:
|
||||
print("No registry token configured — local validation only.")
|
||||
print("Configure a token to get registry-side preflight checks.")
|
||||
return 0
|
||||
print(f"Registry preflight error: {e}", file=sys.stderr)
|
||||
return 1
|
||||
errors = result.get("errors") or []
|
||||
warnings = result.get("warnings") or []
|
||||
suggestions = result.get("suggestions") or []
|
||||
if errors:
|
||||
print(f"Preflight errors ({len(errors)}):")
|
||||
for err in errors:
|
||||
print(f" ERROR: {err}")
|
||||
if warnings:
|
||||
print(f"Preflight warnings ({len(warnings)}):")
|
||||
for warn in warnings:
|
||||
print(f" WARN: {warn}")
|
||||
if suggestions:
|
||||
print(f"Suggestions ({len(suggestions)}):")
|
||||
for sug in suggestions:
|
||||
print(f" HINT: {sug}")
|
||||
if not errors and not warnings and not suggestions:
|
||||
print("Registry preflight passed.")
|
||||
return 0 if not errors else 1
|
||||
|
||||
# Check for token
|
||||
config = load_config()
|
||||
|
||||
Reference in New Issue
Block a user