When running a pre- or post-install script, there doesn't seem to be a way to pass information back to the installer to display a more descriptive error to the user if the script fails. We can call exit 1 from the script if there's an error, and then the standard Apple error message is shown: "The installation failed. The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance." It would be nice if, for example, the script could output to stderr and have that shown to the user as the error message.
Is there any way that this is possible now? Would it be possible to add?