From db69a1875d219310b3050b35cdc46c20ec45cc04 Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Mon, 23 Jan 2023 00:38:17 +0000 Subject: [PATCH] fix: Remove `adapter` if core22+ is set as base on snapcraft (#7378) --- .changeset/thin-terms-change.md | 5 +++++ packages/app-builder-lib/src/targets/snap.ts | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 .changeset/thin-terms-change.md diff --git a/.changeset/thin-terms-change.md b/.changeset/thin-terms-change.md new file mode 100644 index 00000000000..8d08473a9f9 --- /dev/null +++ b/.changeset/thin-terms-change.md @@ -0,0 +1,5 @@ +--- +"app-builder-lib": major +--- + +Remove extra adapter field if core22 is set as base for snapcraft diff --git a/packages/app-builder-lib/src/targets/snap.ts b/packages/app-builder-lib/src/targets/snap.ts index b834e1009ae..2c498d70a8b 100644 --- a/packages/app-builder-lib/src/targets/snap.ts +++ b/packages/app-builder-lib/src/targets/snap.ts @@ -71,6 +71,10 @@ export default class SnapTarget extends Target { } if (options.base != null) { snap.base = options.base + // from core22 onwards adapter is legacy + if (Number(snap.base.split("core")[1]) >= 22) { + delete appDescriptor.adapter + } } if (options.grade != null) { snap.grade = options.grade