macadmins / installapplications

A tool for dynamically using installapplication
Apache License 2.0
286 stars 62 forks source link

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

Open erikng opened 3 years ago

erikng commented 3 years ago

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)

rodchristiansen commented 3 years ago

What about adding Rosetta install in preflight script?

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

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.

korylprince commented 3 years ago

@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.