fix(release): a snap built in a clone of its own is packed without --output, into the clone
All checks were successful
CI / check (push) Successful in 40m26s
CI / deploy (push) Successful in 1m4s

snapcraft builds in LXD with the project mounted at /root/project and passes --output
on unchanged: naming the clone itself, it took the clone for a file in the folder above,
outside the project, and refused it again. Without --output it packs into the clone
(checked with snapcraft 9.2.1 in Todo's clone), from where the release tool moves it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-03 10:31:05 +01:00
commit c8d94d0ceb
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -167,18 +167,12 @@ void main() {
);
});
test('is packed inside its clone, as snapcraft packs nowhere outside the '
"project, and Learn's into the release's folder", () {
test('is packed without --output, into its clone, as snapcraft takes the '
"clone's own path for a file outside the project; Learn's into the "
"release's folder", () {
expect(snap.packOutput(root: '/repo', out: 'build/x'), isNull);
expect(
snap.packPath(home: '/home/someone', root: '/repo', out: 'build/x'),
'/home/someone/.cache/halkyon-release/snap/halkyon-todo',
);
expect(
learnRelease.snap!.packPath(
home: '/home/someone',
root: '/repo',
out: 'build/x',
),
learnRelease.snap!.packOutput(root: '/repo', out: 'build/x'),
'/repo/build/x',
);
});