← Back to issue list

pluginhandler: stop using alias for snapcraftctl

View original Github issue

Metadata

Project
snapcraft
Number
#2251
Type
pull request
State
merged
Author
kyrofa
Labels
Created
Updated
Closed

Current evaluation

Merged. Replaced snapcraftctl alias usage with direct PATH installation in the pluginhandler. This prepares the codebase for subshell scriptlet execution, where aliases fail. Approved by reviewers and passed all CI checks.

Suggested action:

No scores available.

Issue body

- [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 tests/unit`? ----- Once the snapcraft CLI supports plugins providing command chains, scriptlets will need to be run in a subshell, a boundary across which aliases cannot cross. Instead of using an alias when running from the snap, this PR makes progress on [LP: #1790978](https://bugs.launchpad.net/snapcraft/+bug/1790978) by simply installing snapcraftctl into its own directory and adding it to the PATH.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Replaced snapcraftctl alias usage with direct PATH installation in the pluginhandler. This prepares the codebase for subshell scriptlet execution, where aliases fail. Approved by reviewers and passed all CI checks.
qwen3.6-35b-a3b-mtp-q6 Merged. Replaced the snapcraftctl alias with direct PATH installation to enable execution across required subshell boundaries for plugin command chains. Resolves LP #1790978 and passes all unit tests.
qwen3.6-35b-a3b-mtp-q6 Merged. Replaced the snapcraftctl alias with direct PATH installation to support subshell execution for plugin command chains, resolving LP #1790978. Changes passed unit tests and codecov checks.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
76%
#3406 pluginhandler: do not walk symlinks for include filesets snapcraft merged Merged fix prevents snapcraft from incorrectly traversing symlinks during include fileset generation. Checks targets before walking to resolve filtering issues for symlinked directories. Approved, passed CI, and merged.
70%