[SalesForce] SFDX: ERROR: INVALID_OPERATION: rollbackOnError option must be true on a production org. When using Salesforce DX pre-release and Visual Studio Code

I have a Visual Studio Code project which has beed authorised against a production environment.

I am using the Salesforce DX CLI pre-release:

sfdx plugins:install salesforcedx@pre-release

When I right-click on an Apex class in Visual Studio Code and select:

SFDX: Deploy Source to Org

I get this error message:

ERROR: INVALID_OPERATION: rollbackOnError option must be true on a production org

How do I set rollbackOnError to true in the sfdx-config.json or sfdx-project.json?

Such that it's set correctly when I use the SFDX: Deploy Source to Org command.

Best Answer

Sorry feel free to @ mention me here in the future. This is a known limitation that the team is addressing. We'll add these validation capabilities to the force:source:deploy command in the near future. For now, @sfdcfox's workaround is the best approach.