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
836 stars 131 forks source link

IMPORTANT: Disk Space - Dual Check Issue. Download taking 29GB instead of 12GB. erase-install ver. 29.1 #379

Closed sundeep443 closed 1 year ago

sundeep443 commented 1 year ago

Describe the bug script checking disk-space twice before downloading and after downloading also and taking a lot much space.

To Reproduce we ran the script through jamf policy keeping the application to self service

Expected behavior script should check the available space just once before downloading as after downloading it's taking about 25+ GB and then if user have 49 GB available(45 + GB) before downloading then after downloading it's showing 20GB available and script is terminating.

Code/log output uploading the log.

Screenshots log uploaded.

Environment (please complete the following information):

Additional context --power-wait-limit 120 is not working as showing waiting 0 sec.

grahampugh commented 1 year ago

It needs to check both before and after the download.

If there is less than 45 GB space after the download has finished, the installation may fail. You can override this if you want to test smaller values: use the --min-drive-space option.