Skip to content

A full-featured download manager.

fix(snap): stop declaring a desktop entry the prime step never produces (#2191)

Dr_rOot5e963a9cfa4c
diff --git a/build/snap/snapcraft.yaml.in b/build/snap/snapcraft.yaml.in
index f227ddf2..20d25fe0 100644
--- a/build/snap/snapcraft.yaml.in
+++ b/build/snap/snapcraft.yaml.in
@@ -36,7 +36,6 @@ plugs:
apps:
motrix:
command: app/motrix --no-sandbox
- desktop: meta/gui/motrix.desktop
extensions:
- gnome
environment:
diff --git a/tests/scripts/snap-project.test.ts b/tests/scripts/snap-project.test.ts
index 601a56c3..c79ad283 100644
--- a/tests/scripts/snap-project.test.ts
+++ b/tests/scripts/snap-project.test.ts
@@ -130,6 +130,13 @@ describe('prepare-snap-project', () => {
'unity7',
])
expect(yaml.apps.motrix.extensions).toEqual(['gnome'])
+
+ // The desktop entry ships through snap/gui/, which snapcraft copies into
+ // meta/gui/ when it builds the snap. The apps.<name>.desktop key is the
+ // other, mutually exclusive route: its path resolves against the prime
+ // directory during the prime step, where nothing puts this file. Declaring
+ // both made snapcraft look for prime/meta/gui/motrix.desktop and fail.
+ expect(yaml.apps.motrix.desktop).toBeUndefined()
expect(yaml.apps['native-host'].plugs).toEqual(['desktop', 'network'])
expect(yaml.plugs).toEqual({
'browser-support': {