diff --git a/src/yaml.js b/src/yaml.js index 43f6d49..b8455d3 100644 --- a/src/yaml.js +++ b/src/yaml.js @@ -20,7 +20,6 @@ const common = require('electron-installer-common') const fs = require('fs-extra') const { merge, pull } = require('lodash') const path = require('path') -const semver = require('semver') const { spawn } = require('@malept/cross-spawn-promise') const which = require('which') const yaml = require('js-yaml') @@ -155,9 +154,6 @@ class SnapcraftYAML { } transformFeatures () { - if (semver.satisfies(this.electronVersion, '>= 5.0.0') && !this.features.browserSandbox) { - this.features.browserSandbox = true - } for (const feature of Object.keys(this.features)) { this.transformFeature(feature) } diff --git a/test/yaml.js b/test/yaml.js index 7f410a8..4428c1c 100644 --- a/test/yaml.js +++ b/test/yaml.js @@ -85,12 +85,6 @@ test('browserSandbox feature', async t => { t.deepEqual(plugs['browser-sandbox'], { interface: 'browser-support', 'allow-sandbox': true }, 'browser-sandbox plug exists') }) -test('browserSandbox is always on for Electron >= 5.0.0', async t => { - const { apps } = await createYaml(t, { name: 'electronAppName' }, '5.0.0') - util.assertNotIncludes(t, apps.electronAppName.plugs, 'browser-support', 'browser-support is not in app plugs') - util.assertIncludes(t, apps.electronAppName.plugs, 'browser-sandbox', 'browser-sandbox is in app plugs') -}) - test('browserSandbox feature with custom plugs', async t => { const { apps, plugs } = await createYaml(t, { name: 'electronAppName', appPlugs: ['foobar'], features: { browserSandbox: true }, plugs: { foobar: { interface: 'dbus', name: 'com.example.foobar' } } }) util.assertIncludes(t, apps.electronAppName.plugs, 'browser-sandbox', 'browser-sandbox is in app plugs')