macadmins/installapplications

InstallApplications silently fails with packages that are not universal if Rosetta is not installed

erikng opened this issue · 3 comments

When installing packages that do not contain <options customize="never" require-scripts="false" hostArchitectures="x86_64,arm64"/> in their Distribution file, IAs attempts to install the package and silently fails. It thinks the install is successful.

Your provisioning process may then fail in weird ways. A second IAs run will likely work, because Rosetta is now installed (by another script you have)

What about adding Rosetta install in preflight script?

if [ $(/usr/bin/arch) == "arm64" ] ; then
    /usr/sbin/softwareupdate --install-rosetta --agree-to-license
fi

I think I'm more interested in detecting and logging this so admins have some kind of idea as to what's going on. Debugging this took an entire day to figure out.

@rodchristiansen's method works for me, but the Rosetta install command returns a 0, so make sure you add an exit 1 to the end of the script, or installapplications will remove itself before running anything else.