Silent installation of package doesn't run package's plugins

Hey all,
I am working on a macOS application that has a requirement to have both normal and silent installation. The created package that installs the app uses a custom built plugin (which is packaged with the app) to retrieve package's name and use that as environment and secret for the installed application.

When package is installed non-silently, the plugin runs properly and is visible as a step in the installer (attached screenshot, environment step).

It can be confirmed that it runs as Console app records logs from the plugin and the file with environment is modified accordingly.

If the package is installed silently via command line in terminal:
sudo installed -pkg <package_name> -target /Applications -verbose -dumplog
no logs are caught by the Console app and there is no indication that plugin has ran as the file it modifies, isn't modified.

Is it possible to run package's plugins in the silent installation and if so, what has to be done to do it?

If needed I can provide more information about the installer package structure or plugin's project.

Thanks in advance!

Silent installation of package doesn't run package's plugins
 
 
Q