packages icon indicating copy to clipboard operation
packages copied to clipboard

run objc/swift code during cli installation

Open soldatenkodmitru opened this issue 2 years ago • 2 comments

I have the project with custom plugins writing on objective-c. When I run installation via command line “installer sudo -pkg # {package} -target /" my objc code don't perform. Is there a way to run objc-code during cli installation?

soldatenkodmitru avatar Dec 03 '22 14:12 soldatenkodmitru

If this is an Installer plugin, it won't run in headless mode (i.e. via the installer(8) command line tool or a deployment solution such as ARD, Jamf, Intunes, Workspace One, etc.).

http://s.sudre.free.fr/Stuff/Installer/Installer_Plugins/InstallerPlugins-OnceUponATime.html

packagesdev avatar Dec 04 '22 23:12 packagesdev

In your preinstall/postinstall scripts you can detect variable "COMMAND_LINE_INSTALL". If installer run from terminal (non-GUI installation) variable COMMAND_LINE_INSTALL=1, otherwise this variable is unset.

ferben avatar Nov 13 '23 08:11 ferben