[SalesForce] Scratch Org Definition – Install Managed Package

Reading through the answer about installing managed packages in scratch orgs and found this one especially helpful:

How to install managed package using Salesforce DX CLI?

My question is this:

How do you install a managed package when creating a scratch org via specifying in the scratch org definition file? Is it even possible?

The use case is when developing extension packages the scratch orgs will always have to have the base package installed and was looking to automate it a bit.

Kinda of getting lost in all the outdated info out there from the beta and such and can't seem to find anything that directly answers the question.

Best Answer

We do not currently define package info in the scratch org config.

Use the CLI command sfdx force:package:install ... immediately after creating the scratch org.

Related Topic