← Back to issue list

Add detection for an existing `.snapcraft.yaml` file before running `snapcraft init`

View original Github issue

Metadata

Project
snapcraft
Number
#669
Type
pull request
State
merged
Author
tsimonq2
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #669 (commit 2cd727259) makes snapcraft init detect an existing .snapcraft.yaml, preventing creation of a duplicate snapcraft.yaml; a unit test was added.

Resolution: closed resolved

Reason: PR #669 was merged as commit 2cd727259. The change fixes bug 1604326 and includes a unit test covering existing .snapcraft.yaml detection.

Evaluated by: mr-cal-bot

No scores available.

Issue body

(This fixes bug [1604326](https://pad.lv/1604326)) This ensures that an extra `snapcraft.yaml` isn't created when a `.snapcraft.yaml` file already exists.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #669 (commit 2cd727259) makes snapcraft init detect an existing .snapcraft.yaml, preventing creation of a duplicate snapcraft.yaml; a unit test was added.
stealth/space-bunny-alpha — closed resolved Merged PR #669 (commit 2cd727259) now detects an existing .snapcraft.yaml before snapcraft init, preventing a duplicate snapcraft.yaml; a unit test was added.
qwen/qwen3.6-35b-a3b — — Merged fix preventing snapcraft init from creating a duplicate snapcraft.yaml when .snapcraft.yaml exists. A unit test was added per reviewer request before merge.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix that prevents creating a duplicate snapcraft.yaml when .snapcraft.yaml already exists. The contributor added a requested unit test before maintainer approval and merge.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1604326 snapcraft init doesn't fail if there is a .snapcraft.yaml file snapcraft (launchpad) closed Fixed by merged snapcraft#669 (commit 2cd727259): snapcraft init now detects an existing .snapcraft.yaml and fails instead of creating snapcraft.yaml.
78%
#5664 fix: snapcraft init crash when snapcraft.yaml exists but is empty snapcraft merged Merged #5664 as commit f78e6e5d1, preventing snapcraft init from crashing when snapcraft.yaml is empty or invalid and adding unit coverage.
73%