grahampugh / erase-install

A script that automates downloading macOS installers, and optionally erasing or upgrading macOS in a single process. Watch the video!
https://grahamrpugh.com/2023/05/14/macaduk-presentation-eraseinstall.html
Apache License 2.0
845 stars 132 forks source link

/dev/stdin: line 117: /usr/local/bin/dialog: No such file or directory #303

Closed gns-jdaniel closed 2 years ago

gns-jdaniel commented 2 years ago

I've been running the following command successfully for months: curl -s https://raw.githubusercontent.com/grahampugh/erase-install/main/erase-install.sh | sudo bash /dev/stdin --user=admin --force-curl --erase --min-drive-space 45 --replace_invalid --check-power --power-wait-limit 180

However, when I tried it today, I got the following error message:

[erase-install] v28.0 script execution started: Fri Oct 21 09:57:23 PDT 2022 [erase-install] Caffeinating this script (pid=59161) [erase-install] System version: 12.4 [check_free_space] OK - 430 GB free/purgeable disk space detected [check_power_status] OK - AC power detected [erase-install] Looking for existing installer app or pkg [find_existing_installer] Installer found at /Applications/Install macOS Monterey.app. [check_installer_is_valid] Checking validity of /Applications/Install macOS Monterey.app. [check_installer_is_valid] Mounting /Applications/Install macOS Monterey.app/Contents/SharedSupport/SharedSupport.dmg [check_installer_is_valid] Using Build value from com_apple_MobileAsset_MacSoftwareUpdate.xml Volume Shared Support on disk4s2 force-unmounted [compare_build_versions] Comparing (1) 21F79 with (2) 21G115 [check_installer_is_valid] Installer: 21G115 >= System: 21F79 : valid build. [erase-install] Running on architecture arm64 [get_user_details] ask for user credentials (attempt 1/5) /dev/stdin: line 117: /usr/local/bin/dialog: No such file or directory SyntaxError: JSON Parse error: Unexpected EOF SyntaxError: JSON Parse error: Unexpected EOF yes myusername is a member of everyone [get_user_details] myusername is not a Volume Owner [get_user_details] ask for user credentials (attempt 2/5) /dev/stdin: line 117: /usr/local/bin/dialog: No such file or directory [repeat indefinitely from line 117 error to get_user_details]

What has changed? I'm first logging in as the admin user in Terminal, while the user "myusername" is logged in in the GUI, so that I have sudo.

gns-jdaniel commented 2 years ago

This command works fine: curl -s https://raw.githubusercontent.com/grahampugh/erase-install/v26.2/erase-install.sh | sudo bash /dev/stdin --user=admin --force-curl --erase --min-drive-space 45 --replace_invalid --check-power --power-wait-limit 180

gns-jdaniel commented 2 years ago

[erase-install] v26.2 script execution started: Fri Oct 21 10:33:38 PDT 2022 [erase-install] Caffeinating this script (pid=91270) [check_free_space] OK - 423 GB free/purgeable disk space detected [check_power_status] OK - AC power detected [erase-install] Looking for existing installer app or pkg [find_existing_installer] Installer found at /Applications/Install macOS Monterey.app. [check_installer_is_valid] Checking validity of /Applications/Install macOS Monterey.app. [check_installer_is_valid] Mounting /Applications/Install macOS Monterey.app/Contents/SharedSupport/SharedSupport.dmg [check_installer_is_valid] Using Build value from com_apple_MobileAsset_MacSoftwareUpdate.xml Volume Shared Support on disk4s2 force-unmounted [compare_build_versions] Comparing (1) 21F79 with (2) 21G115 [check_installer_is_valid] Installer: 21G115 >= System: 21F79 : valid build. [erase-install] Running on architecture arm64 yes admin is a member of everyone [get_user_details] admin is a Volume Owner [get_user_details] ask for password (attempt 1/5) [check_password] Success: the password entered is the correct login password for admin. yes admin is a member of admin [erase-install] Installer is at: /Applications/Install macOS Monterey.app [check_free_space] OK - 423 GB free/purgeable disk space detected

[erase-install] WARNING! Running /Applications/Install macOS Monterey.app with eraseinstall option

[erase-install] Opening osascript dialog (language=en) [erase-install] updating preboot files (takes a few seconds)... [erase-install] preboot files updated button returned:OK

grahampugh commented 2 years ago

Oops, sorry, looks like I did a weird extra commit into 27.0 that should not have happened, which then got merged into main. I didn't notice because I tested with the package, which was made before that extra commit.

I've reverted it to the "real" 27.0 now, so it should be good now.