I was having some issues with a particular source push to a new scratch org and wanted to examine the underlying metadata based package that was being deployed to Salesforce. How can I see what the SFDX CLI was deploying with my
SFDX_MDAPI_TEMP_DIR environment variable can be configured to retain the underlying metadata packages.
From the docs:
Places the files (in metadata format) in the specified directory when you run some CLI commands, such as
force:source:<name>. Retaining these files can be useful for several reasons. You can debug problems that occur during command execution. You can use the generated
package.xmlwhen running subsequent commands, or as a starting point for creating a manifest that includes all the metadata you care about.
From a Windows command prompt:
I'd avoid pointing it to a sub-directory of your current project if possible to keep it separate from the rest of the source.