3 Commits

Author SHA1 Message Date
Alois Klink
d8cb8f7815 fix(afterPack): error on launch from deb terminal
When installing balena-etcher via apt on Debian/Ubuntu,
the command `balena-etcher-electron` fails with the error:
line 3: /usr/bin/balena-etcher-electron.bin: No such file or directory

This is because the /usr/bin/balena-etcher-electron is a symlink
to /opt/balenaEtcher/balena-etcher-electron, but the script looks
for balena-etcher-electron.bin in the symlink directory, not the
actual script location directory.

This commit uses `$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")` to
find the real location of the balena-etcher-electron script without
symlink, so that balena-etcher-electron.bin is correctly found.

Change-Type: patch
Changelog-Entry: Fix error when launching from terminal when installed via apt.
Fixes: https://github.com/balena-io/etcher/issues/3074
2020-02-20 13:04:17 +01:00
Alexis Svinartchouk
1408dd48a1 Don't add --no-sandbox when ELECTRON_RUN_AS_NODE true
Changelog-entry: Don't add --no-sandbox when ELECTRON_RUN_AS_NODE true
Change-type: patch
2019-12-10 11:04:01 +01:00
Alexis Svinartchouk
2f828b1d39 Wrapper script for linux to add --no-sandbox when running as root
Change-type: patch
2019-12-03 13:45:11 +01:00