Much as I love editing text files and entering commands into Terminal.app, I do also appreciate a good GUI frontend. Apart from munkiimport, I mainly manage Munki using MunkiAdmin, as I referenced in Absolute beginner’s guide to setting up Munki (not monkey).
Of course, I got a bit too comfortable with the GUI frontend, and I put in incorrectly a post-uninstall script for a package and got back this error message: Error executing script postuninstall_script: [Errno 8] Exec format error.
After I actually read the Munki wiki page on Pre And Postinstall Scripts, I realized my mistake—I’d put in only the command I wanted without giving the environment for that command.
In case anyone else who’s GUI-dependent (and who also hasn’t read the wiki carefully) runs into this issue, that’s the solution—put in the environment you’re using (Is it bash, shell, python, etc.?), and not just the command itself.