You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some packages (such as PDBReSym - mandiant/VM-Packages#986 (comment)) have installer.ps1 files that not only install the tool, but run it. This is not ideal, there is a difference between installation of a tool and executing it. For this package in particular, we always want it to be installed, but do NOT always want it to be run because it can bloat the VM. I suggest we extend the installer.ps1 scripts to accept a run argument to indicate if the package should be run after installation. The config.xml files can have the flag present like this <package name="PDBReSym.vm" run=false/>. This way packages can be included in the default configuration always, but only run in FULL configurations sometimes.
The text was updated successfully, but these errors were encountered:
This seems fairly possible to do if we used this: https://docs.chocolatey.org/en-us/create/functions/get-packageparameters
Note the part: choco install <pkg_id> --params "'/LICENSE:value;". We would use something like run instead, then inside of packages we could test for this to determine if it should be run or not.
Example 2:
# see https://docs.chocolatey.org/en-us/guides/create/parse-packageparameters-argument
# command line call: `choco install <pkg_id> --params "'/LICENSE:value'"`
$pp = Get-PackageParameters
# Read-Host, PromptForChoice, etc are not blocking calls with Chocolatey.
# Chocolatey has a custom PowerShell host that will time these calls
# after 30 seconds, allowing headless operation to continue but offer
# prompts to users to ask questions during installation.
if (!$pp['LICENSE']) { $pp['LICENSE'] = Read-Host 'License key?' }
# set a default if not passed
if (!$pp['LICENSE']) { $pp['LICENSE'] = '1234' }
That being said, I think mandiant/VM-Packages#991 might be the way to go for now, but this may be something to consider down the road.
mandiant/VM-Packages#991 fixed this issue. I think splitting packages is a better approach as it uses the current structure. At the moment the packages do not receive arguments from the installer to run and It that would imply complicating the installer and the packages code.
Details
Some packages (such as PDBReSym - mandiant/VM-Packages#986 (comment)) have
installer.ps1
files that not only install the tool, but run it. This is not ideal, there is a difference between installation of a tool and executing it. For this package in particular, we always want it to be installed, but do NOT always want it to be run because it can bloat the VM. I suggest we extend theinstaller.ps1
scripts to accept arun
argument to indicate if the package should be run after installation. Theconfig.xml
files can have the flag present like this<package name="PDBReSym.vm" run=false/>
. This way packages can be included in the default configuration always, but only run in FULL configurations sometimes.The text was updated successfully, but these errors were encountered: