Resolve AppImage binary path correctly when running it as root (#490)

Currently, when the AppImage was being ran as `root` we would attempt to
run `./usr/bin/etcher`, assuming we were inside the AppDir already and
the relative path would resolve correctly.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
Juan Cruz Viotti 2016-06-17 15:12:15 -04:00 committed by GitHub
parent 9895773b6c
commit f49e2982e5

View File

@ -35,7 +35,7 @@ error() {
# Check if we're running as root
if [ "$EUID" -eq 0 ]; then
./$binary
$APPDIR/$binary
else
# Determine a unique mountpoint based on the current mount point.