Closed carlashley closed 6 months ago
Some info after modifying erase-install.sh
with set -x
, I've removed a large chunk of the output and copied it from after the point the script picks up that this is run on arm64
.
2024-01-30 07:37:22 | v32.0 | [erase-install] Running on architecture arm64
+./erase-install.sh:3175> [[ arm64 == arm64 && no == yes || no == yes ]]
+./erase-install.sh:3180> [[ '' == yes ]]
+./erase-install.sh:3183> [[ '' == yes ]]
+./erase-install.sh:3185> [[ ! -d '' && ! -f '' ]]
+./erase-install.sh:3186> [[ ! -n '' ]]
+./erase-install.sh:3188> [[ no == yes || no == yes || '' == yes ]]
+./erase-install.sh:3218> [[ -n yes ]]
+./erase-install.sh:3225> [[ -n yes ]]
+./erase-install.sh:3226> run_fetch_full_installer
+run_fetch_full_installer:1> softwareupdate_args=( )
+run_fetch_full_installer:2> run_list_full_installers
+run_list_full_installers:1> [[ 14 -lt 13 || 14 -eq 13 ]]
+run_list_full_installers:25> [[ '' == yes ]]
+run_fetch_full_installer:3> [[ -f /Library/Management/erase-install/ffi-list-full-installers.txt ]]
+./erase-install.sh:3219> dialog_progress fetch-full-installer
+run_fetch_full_installer:59> writelog '[run_fetch_full_installer] Could not obtain installer information using softwareupdate --list-full-installers. Cannot continue.'
+writelog:1> DATE=+writelog:1> date '+%Y-%m-%d %H:%M:%S'
+writelog:1> DATE='2024-01-30 07:37:22'
+writelog:2> echo '2024-01-30 07:37:22 | v32.0 | [run_fetch_full_installer] Could not obtain installer information using softwareupdate --list-full-installers. Cannot continue.'
2024-01-30 07:37:22 | v32.0 | [run_fetch_full_installer] Could not obtain installer information using softwareupdate --list-full-installers. Cannot continue.
+run_fetch_full_installer:60> echo
+run_fetch_full_installer:61> exit 1
+./erase-install.sh:3226> finish
+finish:1> local exit_code=1
+finish:3> [[ -n '' ]]
+finish:9> [[ -e '' ]]
+finish:10> [[ -e '' ]]
+finish:13> kill_process caffeinate
+kill_process:1> process=caffeinate
+kill_process:2> echo
+kill_process:3> process_pid=+kill_process:3> /usr/bin/pgrep -a caffeinate
+kill_process:3> process_pid=19591
+kill_process:4> writelog '[erase-install] attempting to terminate the '\''caffeinate'\'' process - Termination message indicates success'
+writelog:1> DATE=+writelog:1> date '+%Y-%m-%d %H:%M:%S'
+writelog:1> DATE='2024-01-30 07:37:22'
+writelog:2> echo '2024-01-30 07:37:22 | v32.0 | [erase-install] attempting to terminate the '\''caffeinate'\'' process - Termination message indicates success'
2024-01-30 07:37:22 | v32.0 | [erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success
+kill_process:5> kill 19591
+kill_process:6> /usr/bin/pgrep -a caffeinate
+kill_process:9> echo
+finish:16> [[ '' == yes || 1 -gt 0 ]]
+finish:17> writelog '[finish] sending quit message to dialog (/var/tmp/dialog.qrt)'
+writelog:1> DATE=+writelog:1> date '+%Y-%m-%d %H:%M:%S'
+writelog:1> DATE='2024-01-30 07:37:22'
+writelog:2> echo '2024-01-30 07:37:22 | v32.0 | [finish] sending quit message to dialog (/var/tmp/dialog.qrt)'
2024-01-30 07:37:22 | v32.0 | [finish] sending quit message to dialog (/var/tmp/dialog.qrt)
+finish:18> /bin/echo quit:
+finish:20> sleep 0.5
+finish:25> writelog '[finish] Script exit code: 1'
+writelog:1> DATE=+writelog:1> date '+%Y-%m-%d %H:%M:%S'
+writelog:1> DATE='2024-01-30 07:37:23'
+writelog:2> echo '2024-01-30 07:37:23 | v32.0 | [finish] Script exit code: 1'
2024-01-30 07:37:23 | v32.0 | [finish] Script exit code: 1
+finish:26> exit 1
I can reproduce the bug, but just to let you know, the --caching-server
option is not applicable to the --fetch-full-installer
workflows. It's only used in conjunction with mist-cli
. But I do believe that --ffi
will automatically use a caching server without specifying anything.
You also can't use --pkg
with --fetch-full-installer
, because you can't get a pkg from softwareupdate.
Should be fixed in https://github.com/grahampugh/erase-install/releases/tag/v33.0
Describe the bug When using the
--ffi/--fetch-full-installer
argument,erase-install
exits with this error message:Running
softwareupdate --list-full-installers
immediately after results in:To Reproduce This has been tested on macOS 14.3 (23D56) with
erase-install
v32.0. This occurs in GUI login + Terminal.app, as well as when executed viassh
(with someone in a GUI login)./Library/Management/erase-install/erase-install.sh --fetch-full-installer
/Library/Management/erase-install/erase-install.sh --fetch-full-installer --pkg
/Library/Management/erase-install/erase-install.sh --fetch-full-installer --version 14.3
/Library/Management/erase-install/erase-install.sh --fetch-full-installer --version 14.3 --pkg
/Library/Management/erase-install/erase-install.sh --version 14.3 --ffi --caching-server http://redacted.org:port
/Library/Management/erase-install/erase-install.sh --version 14.3 --ffi --caching-server http://redacted.org:port --pkg
Expected behavior
erase-install
parsing the results ofsoftwareupdate --list-full-installers
and matching version data.Code/log output Log file after running:
/Library/Management/erase-install/erase-install.sh --version 14.3 --ffi --caching-server http://10.0.0.63:50690 --pkg
Screenshots
Environment (please complete the following information):
erase-install
v32.0