Installer: Log more audio device info if BGMDevice doesn't appear.

This commit is contained in:
Kyle Neideck 2022-05-13 12:03:33 +10:00
parent 5f1641da8f
commit a730fb98f8
No known key found for this signature in database
GPG key ID: CAA8D9B8E39EC18C
2 changed files with 16 additions and 6 deletions

View file

@ -109,7 +109,10 @@ jobs:
test
echo '::endgroup::'
- name: Uninstall Background Music.
run: genv --default-signal=PIPE yes | sudo ./uninstall.sh
run: |
# `tput` expects this to be set.
export TERM=xterm-256color
genv --default-signal=PIPE yes | sudo ./uninstall.sh
- name: Check the BGM dirs and files were removed.
run: |
if ls -la "/Applications/Background Music.app"; then exit 1; fi
@ -156,11 +159,8 @@ jobs:
-dumplog
- name: Print the installer logs.
if: always()
run: |
echo '::group::install.log'
# This trims the start of the log to save space.
grep -E -A 9999 -B 20 'Background.?Music' /var/log/install.log
echo '::endgroup::'
run: grep -E -A 9999 -B 20 'Background.?Music' /var/log/install.log
- name: Check the BGM dirs and files were installed again.
if: always()
run: |

View file

@ -75,6 +75,16 @@ while [[ $retries -gt 0 ]]; do
# installer GUI instead of just logging them. See
# <https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW12>.
log "Background Music device not found. Installation failed."
log "Audio devices:"
log $(system_profiler SPAudioDataType)
log "Audio input devices:"
log $(echo 'import AVFoundation
let discoverySession = AVCaptureDevice.DiscoverySession(
deviceTypes: [ .builtInMicrophone, .externalUnknown ],
mediaType: .audio,
position: .unspecified
)
print(discoverySession.devices)' | swift -)
exit 1
fi
else