
Consider the case where a previously elevated mount was not unmounted correctly. `mount | grep $(basename $APPIMAGE)` would evaluate to a multi-line string, and therefore `awk` will perform its work on *each* line separately, usually returning something like: ``` /tmp/.mountXXXX /tmp/.mountYYYY-elevated ``` We then pass `$mountpoint` to `mkdir -p`, which evaluates to: ``` mkdir -p /tmp/.mountXXXX /tmp/.mountYYYY-elevated ``` Therefore `/tmp/.mountXXXX` gets created, and `/tmp/.mountYYYY-elevated` is ran as an executable, causing all sort of cryptic errors to come out. This can be even worse, since the third column of a `mount` line is not always a path, so the errors make even less sense. Fixes: https://github.com/resin-io/etcher/issues/482 Fixes: https://github.com/resin-io/etcher/issues/459 Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Etcher
Flash OS images to SD cards & USB drives, safe & easy.
Etcher is a powerful OS image flasher built with web technologies to ensure flashing an SDCard or USB drive is pleasant and safe experience. It protects you from accidentally writing to your hard-drives, ensures every byte of data was written correctly and much more.


Download | Support | Contributing | Roadmap | CLI
Installers
Refer to the downloads page for the latest pre-made installers for all supported operating systems.
Support
If you're having any problem, please raise an issue on GitHub and the Resin.io team will be happy to help.
License
Etcher is free software, and may be redistributed under the terms specified in the license.