← Back to issue list

pluginhandler: error out on scriptlet errors

View original Github issue

Metadata

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

Current evaluation

Merged fix ensuring scriptlet errors trigger immediate failures instead of only catching the last command's error. Approved by one reviewer, passed CI, and merged by maintainer sergiusens. Resolves Launchpad bug #1707189.

Suggested action:

No scores available.

Issue body

The code only handled an erroring scenario correctly when the last command executed on a script raised an error. LP: #1707189 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged fix ensuring scriptlet errors trigger immediate failures instead of only catching the last command's error. Approved by one reviewer, passed CI, and merged by maintainer sergiusens. Resolves Launchpad bug #1707189.
qwen3.6-35b-a3b-mtp-q6 Merged fix to pluginhandler that properly exits on scriptlet errors, resolving LP #1707189. Previously, only the final command's failure triggered an error. The update now catches and reports all scriptlet failures immediately.
qwen3.6-35b-a3b-mtp-q6 Merged fix updating pluginhandler to immediately exit on scriptlet errors, correcting previous logic that only failed on the final command. Resolves LP: #1707189.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2117 pluginhandler: correctly dedent the run script snapcraft merged Merged fix to correctly dedent the pluginhandler run script. Passes CI checks and serves as prework for improved error output, partially addressing Launchpad bug #1767625.
76%
#1466 scriptlets erroring behavior snapcraft closed Closed via pull request #1545. The merged fix resolves the scriptlets erroring behavior bug, implementing proper error handling for scriptlet execution.
73%
#960 pluginhandler: install scriptlet support snapcraft merged Merged into master, adding install scriptlet support to the pluginhandler. The change passed review and CI, increased coverage by 0.01%, and included updated documentation. The change modified 9 files with 279 additions and 101 deletions.
71%
#3317 plugin handler: properly handle snapcraftctl errors snapcraft merged Merged fix for plugin handler to properly catch snapcraftctl errors. Replaced specific exception handling with a broad catch in the scriptlet runner to prevent silent failures and redundant output. Approved, passed CI, and increased coverage.
70%
#987 pluginhandler: prepare scriptlet support snapcraft merged Merged into master after reviewer approval. The change prepares scriptlet support in the pluginhandler, modifying 7 files (+77/-10 lines). Code coverage increased by less than 0.01% upon integration.
70%