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

Tried to install using an invalid installer (Sierra) #298

Closed dnikles closed 1 year ago

dnikles commented 2 years ago

Describe the bug Script saw that a build was invalid, but continued to try to use it

To Reproduce Current OS = 11 Installer on disk = /Applications/Install macOS Sierra.app options given = --version=12.6 --update --check-power --power-wait-limit 300 --reinstall --pkg --move --min-drive-space 30 --current-user --rebootdelay 10

Expected behavior Download a new installer

Code/log output

   [erase-install] Caffeinating this script (pid=1815)
   [check_free_space] OK - 930 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 Sierra.app.
   [check_installer_is_valid] Checking validity of /Applications/Install macOS Sierra.app.
   [check_installer_is_valid] Using DTSDKBuild value from Info.plist
   [compare_build_versions] Comparing (1) 20F71 with (2) 16A322
   [compare_build_versions] 20F71 > 16A322
   [check_installer_is_valid] Installer: 16A322 < System: 20F71 : invalid build.
   [erase-install] Running on architecture i386
   [erase-install] Installer is at: /Applications/Install macOS Sierra.app
   [erase-install] Invoking --move option
   [move_to_applications_folder] Valid installer already in /Applications folder
   [erase-install] Closing jamfHelper download message (language=en)
   [check_free_space] OK - 930 GB free/purgeable disk space detected
   [erase-install] WARNING! Running /Applications/Install macOS Sierra.app with reinstall option
   [erase-install] Opening jamfHelper message (language=en)
   [launch_startosinstall] Launching startosinstall
Usage: startosinstall --applicationpath <install macOS.app path> --volume <target volume path>

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

grahampugh commented 2 years ago

Should hopefully be fixed in the latest v27.0 upload.