Updated softwareupdate expect

This commit is contained in:
Brian Zalewski 2023-12-24 23:42:37 +00:00
parent 489e6f8a38
commit 4f8c8e2ff1

View file

@ -125,7 +125,7 @@ upgradeDarwin() {
### Run upgrade process ### Run upgrade process
logg info 'Applying OS upgrades (if available)' logg info 'Applying OS upgrades (if available)'
expect -c "set timeout -1 expect -c "set timeout -1
spawn sudo sh -c "sudo softwareupdate -i -a --agree-to-license" || logg error 'Failed to trigger a system update via sudo softwareupdate -i -a --agree-to-license' spawn sudo softwareupdate -i -a --agree-to-license
expect \"Password:\" expect \"Password:\"
send \"${SUDO_PASSWORD}\r\" send \"${SUDO_PASSWORD}\r\"
expect eof" &> /dev/null || EXIT_CODE=$? expect eof" &> /dev/null || EXIT_CODE=$?