summarylogtreecommitdiffstats
path: root/balena-etcher-electron.sh
diff options
context:
space:
mode:
authorMatthew McGinn2020-01-27 09:57:13 -0500
committerMatthew McGinn2020-01-27 10:00:38 -0500
commit5ec09fd0f86625007d029eea65bec366a55d7edd (patch)
tree08022c93e04e26b8ee04258b99a487436430500e /balena-etcher-electron.sh
parent68138c86403b473828379681b87638b828d159dd (diff)
downloadaur-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-xbalena-etcher-electron.sh8
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 "$@"