fix: handle race condition after softwareupdate completes

Add short delay to ensure installer app exists in /Applications
before proceeding
This commit is contained in:
Tieu Long committed 2026-04-07 01:33:10 +07:00
1 parent f428c4a170
commit 3244dbdc5e
1 file changed
+1 -1
+1 -1
View File
@@ -927,7 +927,7 @@ download_modern_macos() {
log_info "Download attempt $attempt of $download_retries..." log_info "Download attempt $attempt of $download_retries..."
if softwareupdate --fetch-full-installer --full-installer-version "$selected_version_number"; then if softwareupdate --fetch-full-installer --full-installer-version "$selected_version_number"; then
log_info "Download successful!" log_info "Download successful!"
return 0 sleep 5 && return 0
fi fi
if [ $attempt -eq $download_retries ]; then if [ $attempt -eq $download_retries ]; then
log_error "Download failed after $download_retries attempts" log_error "Download failed after $download_retries attempts"