extensions: prepend and append functions for ENV
Metadata
Current evaluation
Merged PR #3811 in commit c314fd967, adding extension helpers to prepend or append paths to environment variables without introducing stray colons.
Resolution: closed resolved
Reason: PR #3811 was merged as commit c314fd967. It introduced ENV prepend/append helpers that correctly handle empty variables and avoid leading or trailing colons.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Simplify the management of environment variables, allowing to just pass
the name of one variable and one or more paths, and they will return a
piece of shell code that prepends or appends the paths to the variable,
taking into account the case when the variable is empty, to avoid adding
a trailing or leading colon.
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `make lint`?
- [ ] Have you successfully run `pytest tests/unit`?
-----
CRAFT-1113
From #3798
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3811 in commit c314fd967, adding extension helpers to prepend or append paths to environment variables without introducing stray colons. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3811 via commit c314fd967, adding ENV prepend/append helpers that safely update path variables without stray leading or trailing colons. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3811 via commit c314fd967, adding ENV prepend/append helpers that safely manage paths without stray leading or trailing colons. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged into main. Introduces prepend and append functions for environment variables in extensions, simplifying path management while safely handling empty variables to avoid trailing or leading colons. Approved by reviewer and passed CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into main. Adds prepend and append functions for environment variables in extensions, simplifying path management by automatically handling empty variables to prevent leading or trailing colons. Achieved 100% diff coverage. |
Update history
No update history recorded yet.
Related work
-
Duplicate Of:
snapcraft#3766
(confidence 85%)
The same titled ENV prepend/append change is associated with PR #3766 and was ultimately resolved through #3811.
-
Related To:
snapcraft#3798
(confidence 70%)
The PR body identifies #3798 as the originating discussion or work item.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3766 extensions: prepend and append functions for ENV | snapcraft | merged | ENV prepend/append helpers were merged via snapcraft#3811 at commit c314fd967, avoiding stray separators when environment variables are empty. | |
| #3761 extensions: Give priority to local environment | snapcraft | closed | Closed unmerged in favor of ENV-ordering work completed by #3811 in commit c314fd967, building on #3766. |