fix(release): the dry run goes on without snapcraft rather than crashing
All checks were successful
CI / check (push) Successful in 38m27s
CI / deploy (push) Successful in 56s

Where snapcraft is missing, the release is refused already; asking it for
its login then threw, so the dry run stopped before listing the rest.

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

View file

@ -835,7 +835,10 @@ final class Releaser({
_refuse('No JDK found (java, keytool).');
}
_environment['PATH'] = '$jdk:${_environment['PATH'] ?? ''}';
if (app.snap?.storeChannel case final channel? when channel.isNotEmpty) {
// Asked only where snapcraft is there: without, the release was
// refused above, and the dry run goes on to say what else it would.
if (app.snap?.storeChannel case final channel?
when channel.isNotEmpty && _which('snapcraft') != null) {
final whoami = await Process.run('snapcraft', ['whoami']);
if (!RegExp(
r'^username:\s*\S',