← Back to issue list

cli: do not duplicate errors

View original Github issue

Metadata

Project
snapcraft
Number
#1347
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged as commit 9e8e336de, PR #1347 eliminated duplicate CLI validation errors and refactored error handling to prevent recurrence.

Resolution: closed resolved

Reason: PR #1347 was approved and merged as commit 9e8e336de. The change ensures snapcraft.yaml validation failures are printed once.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The removal of sys.exit when doing `load_config` had a side effect of printing errors twice. The work here does a bit of cleanup so this mistake does not happen again. LP: #1686557 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged as commit 9e8e336de, PR #1347 eliminated duplicate CLI validation errors and refactored error handling to prevent recurrence.
stealth/space-bunny-alpha — closed resolved Merged PR #1347, commit 9e8e336de, fixed duplicate CLI validation errors caused by removing sys.exit from load_config and refactored error handling to prevent recurrence.
qwen/qwen3.6-35b-a3b — — Merged a fix preventing duplicate CLI error output caused by removing sys.exit in load_config. The PR refactors error handling to prevent recurrence, received approval, and successfully resolves the issue.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix for duplicate CLI error output caused by removing sys.exit in load_config. The refactor cleans up error handling to prevent recurrence. Approved by reviewer and merged.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3125 cli: cleanup error handling snapcraft merged Merged PR #3125 in commit 68c64253b, simplifying CLI error handling with inline typing and removing obsolete Ubuntu 16.04 compatibility logic.
78%
#1790 cli: include consistent commands to fix error conditions snapcraft merged Merged PR #1790 at b78dbda8, standardizing corrective commands in CLI error messages and closing #1733; prerequisite #1640 added richer common-error guidance.
78%
#1640 cli: add what, why, and how to fix to the common errors snapcraft merged Merged PR #1640 (c1200d9ee) added explanations and corrective guidance to common CLI errors across 15 files.
74%
#1733 Apply guidelines from design to error messages with commands that fix snapcraft closed Merged PR #1790 standardized CLI error messages with consistent corrective commands and closed #1733 (commit b78dbda8).
72%
#1429 cli: properly handle exceptions in lifecycle snapcraft closed Closed in favor of #1436, which implemented global CLI exception handling and merged as commit be340e4f7.
72%
#1702 Apply guidelines from design to error messages with reasons for errors snapcraft closed Merged PR #1640 (commit c1200d9ee) added what, why, and how-to-fix guidance to common CLI errors, resolving #1702.
70%