Verify command for the flavor CLI.
Functions
verify_command
verify_command(package_file: str) -> None
Verifies a flavor package.
Source code in flavor/commands/verify.py
| @click.command("verify")
@click.argument(
"package_file",
type=click.Path(exists=True, dir_okay=False, resolve_path=True),
required=True,
)
def verify_command(package_file: str) -> None:
"""Verifies a flavor package."""
final_package_file = Path(package_file)
log.debug("Starting package verification", package=str(final_package_file))
pout(f"🔍 Verifying package '{final_package_file}'...")
try:
result = verify_package(final_package_file)
log.debug(
"Package verification completed",
format=result.get("format"),
signature_valid=result.get("signature_valid"),
)
_display_basic_info(result)
if result["format"] == "PSPF/2025":
_display_pspf_info(result)
_display_signature_status(result)
except Exception as e:
log.error("Verification failed", error=str(e), package=str(final_package_file))
perr(f"❌ Verification failed: {e}")
raise click.Abort() from e
|