From 02cb922dea1c214e339c6b10b8677b2c6d41e4f3 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 13 Apr 2021 10:59:18 -0500 Subject: [PATCH] When running from the Linux snap, use no-sandbox --- .circleci/config.yml | 1 + app/build/resources/linux/Mailspring.desktop.in | 4 ++-- scripts/utils/child-process-wrapper.js | 2 +- snap/snapcraft.template.yaml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5143bc212..42c02bbb2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,6 +5,7 @@ jobs: - image: circleci/node:12.9.1-stretch steps: - checkout + - sudo apt-get update && sudo apt-get install libsecret-1-dev - restore_cache: name: Restore Package Cache keys: diff --git a/app/build/resources/linux/Mailspring.desktop.in b/app/build/resources/linux/Mailspring.desktop.in index ea2dc9710..5bab3b25d 100644 --- a/app/build/resources/linux/Mailspring.desktop.in +++ b/app/build/resources/linux/Mailspring.desktop.in @@ -2,7 +2,7 @@ Name=<%= productName %> Comment=<%= description %> GenericName=Mail Client -Exec=/usr/bin/mailspring %U +Exec=mailspring %U Icon=mailspring Type=Application StartupNotify=true @@ -109,4 +109,4 @@ Name[zh_CN]=新邮件 Name[zh_TW]=新增郵件 Name[zh]=新信息 Name[zu]=Umyalezo omusha -Exec=/usr/bin/mailspring mailto: \ No newline at end of file +Exec=mailspring mailto: \ No newline at end of file diff --git a/scripts/utils/child-process-wrapper.js b/scripts/utils/child-process-wrapper.js index 2bacef23c..c63dde7d4 100644 --- a/scripts/utils/child-process-wrapper.js +++ b/scripts/utils/child-process-wrapper.js @@ -15,7 +15,7 @@ exports.safeExec = function(command, options, callback) { options.stdio = 'inherit'; var child = childProcess.exec(command, options, function(error, stdout, stderr) { - if (error && !options.ignoreStderr) { + if (error && error.code && !options.ignoreStderr) { console.error(`safeExec: the command exited with ${error} ${error.code}`); console.error('`------------- stderr ------------'); console.error(stderr); diff --git a/snap/snapcraft.template.yaml b/snap/snapcraft.template.yaml index 6365e4a7b..0f3fbf571 100644 --- a/snap/snapcraft.template.yaml +++ b/snap/snapcraft.template.yaml @@ -53,7 +53,7 @@ parts: apps: mailspring: - command: desktop-launch $SNAP/usr/share/mailspring/mailspring + command: desktop-launch $SNAP/usr/share/mailspring/mailspring --no-sandbox desktop: usr/share/applications/Mailspring.desktop environment: # Correct the TMPDIR path for Chromium Framework/Electron to