Etcher-cli call fails on macOS GUI
On macOS GUI, the elevation uses oascript
to call a second command (etcher). If etcher binary or MBR file are located in a path with spaces, it fails.
[STAGE 0/6: Preparations - 0%]
[STAGE 0/6: Preparations - 0%]
Preventing system from sleeping
Calling ['/usr/bin/caffeinate', '-dsi']
--> Check System Requirements
Please read https://framagit.org/ideascube/pibox-installer/wikis/System-Requirements for details
--> Ensure user files are present
--> Prepare Image file
--> Flash clean MBR onto SD-card (/dev/disk3)
Call: ['/usr/bin/osascript', '-e', 'do shell script "/Volumes/Kiwix Hotspot/Kiwix Hotspot.app/Contents/MacOS/etcher-cli/etcher -c -y -u -d /dev/disk3 /Volumes/Kiwix Hotspot/Kiwix Hotspot.app/Contents/MacOS/mbr.img 2>&1 >/var/folders/bt/ctdt6vrj33n8yhzhpvyfy53h0000gn/T/tmpamq9x431.log" with administrator privileges']
0:279: execution error: /bin/sh: /Volumes/Kiwix: No such file or directory (127)
--- Exception Trace ---
Traceback (most recent call last):
File "run_installation.py", line 124, in run_installation
File "backend/util.py", line 341, in flash_image_with_etcher
File "backend/util.py", line 108, in subprocess_pretty_check_call
File "backend/util.py", line 100, in subprocess_pretty_call
backend.util.CheckCallException: Process ['/usr/bin/osascript', '-e', 'do shell script "/Volumes/Kiwix Hotspot/Kiwix Hotspot.app/Contents/MacOS/etcher-cli/etcher -c -y -u -d /dev/disk3 /Volumes/Kiwix Hotspot/Kiwix Hotspot.app/Contents/MacOS/mbr.img 2>&1 >/var/folders/bt/ctdt6vrj33n8yhzhpvyfy53h0000gn/T/tmpamq9x431.log" with administrator privileges'] failed
---
--> Failed: Process ['/usr/bin/osascript', '-e', 'do shell script "/Volumes/Kiwix Hotspot/Kiwix Hotspot.app/Contents/MacOS/etcher-cli/etcher -c -y -u -d /dev/disk3 /Volumes/Kiwix Hotspot/Kiwix Hotspot.app/Contents/MacOS/mbr.img 2>&1 >/var/folders/bt/ctdt6vrj33n8yhzhpvyfy53h0000gn/T/tmpamq9x431.log" with administrator privileges'] failed
Installation failed: Process ['/usr/bin/osascript', '-e', 'do shell script "/Volumes/Kiwix Hotspot/Kiwix Hotspot.app/Contents/MacOS/etcher-cli/etcher -c -y -u -d /dev/disk3 /Volumes/Kiwix Hotspot/Kiwix Hotspot.app/Contents/MacOS/mbr.img 2>&1 >/var/folders/bt/ctdt6vrj33n8yhzhpvyfy53h0000gn/T/tmpamq9x431.log" with administrator privileges'] failed
[STAGE 0/6: Preparations - 0%]
Restoring system sleep policy
Stopping caffeinate process #9663
*** DURATIONS SUMMARY ***
TOTAL: 4.4 seconds (Sun Nov 11 09:44:11 2018 to Sun Nov 11 09:44:15 2018)
originally reported by martin.