diff options
author | Matthew McGinn | 2020-01-27 09:57:13 -0500 |
---|---|---|
committer | Matthew McGinn | 2020-01-27 10:00:38 -0500 |
commit | 5ec09fd0f86625007d029eea65bec366a55d7edd (patch) | |
tree | 08022c93e04e26b8ee04258b99a487436430500e /balena-etcher-electron.sh | |
parent | 68138c86403b473828379681b87638b828d159dd (diff) | |
download | aur-5ec09fd0f86625007d029eea65bec366a55d7edd.tar.gz |
update etcher to properly allow sudo (used to flash compute devices)
Signed-off-by: Matthew McGinn <mamcgi@gmail.com>
Diffstat (limited to 'balena-etcher-electron.sh')
-rwxr-xr-x | balena-etcher-electron.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/balena-etcher-electron.sh b/balena-etcher-electron.sh index a65257d9157c..3bd59572ad24 100755 --- a/balena-etcher-electron.sh +++ b/balena-etcher-electron.sh @@ -1,2 +1,6 @@ -#!/usr/bin/sh -exec electron6 /usr/lib/balena-etcher "$@" +#!/bin/bash +ARGS="--no-sandbox" +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + ARGS="" +fi +exec electron6 "${ARGS}" /usr/lib/balena-etcher "$@" |