I use this command
sfdx force:source:deploy -p ./foundation/,./sales,./marketing -c
because I have my metadata organized in 3 different folders. When I run this command, the Salesforce Cli does 3 separate validation deployments. First foundation, then sales, then marketing. Where I'm running into problems is ./foundation has metadata in it that ./sales needs to pass validation. My guess is because ./foundation was only validated and never deployed, ./sales doesn't see the metadata in the org for when it attempts to validate.
Is there a way to validate all the folders at once into one deployment?
Here is my sfdx-project.json
{
"packageDirectories": [
{
"path": "foundation",
"default": true
},
{
"path": "sales"
},
{
"path": "marketing"
}
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "51.0"
}