mirror of
https://github.com/github/spec-kit.git
synced 2026-07-08 23:59:55 +08:00
Address Copilot PR review: reject unknown archive formats, fix case-sensitive check
- Add explanatory comment to empty except KeyError block in _extract_workflow_yml - Use case-insensitive extension matching for local archive detection in workflow add - Reject unknown archive formats with clear error messages instead of silently defaulting to ZIP in preset add --from, extension add --from, download_extension(), and download_pack()
This commit is contained in:
@@ -2151,6 +2151,11 @@ class ExtensionCatalog:
|
||||
raise ExtensionError(f"Failed to save extension archive: {e}")
|
||||
|
||||
# Choose file extension based on detected format.
|
||||
if not archive_fmt:
|
||||
raise ExtensionError(
|
||||
f"Could not determine archive format for {download_url}. "
|
||||
"Ensure the URL points to a .zip or .tar.gz file."
|
||||
)
|
||||
if archive_fmt == "tar.gz":
|
||||
archive_filename = f"{extension_id}-{version}.tar.gz"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user