Skip to content

Commit

Permalink
fix: Remove adapter if core22+ is set as base on snapcraft (#7378)
Browse files Browse the repository at this point in the history
  • Loading branch information
filfreire authored Jan 23, 2023
1 parent e5748b3 commit db69a18
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/thin-terms-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": major
---

Remove extra adapter field if core22 is set as base for snapcraft
4 changes: 4 additions & 0 deletions packages/app-builder-lib/src/targets/snap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db69a18

Please sign in to comment.