Skip to content

Please provide a switch to enforce pushing when doing a deployment and avoid catastrophic accidents! #2188

@eltoroit

Description

@eltoroit

Is your feature request related to a problem? Please describe.
A lack of a switch to enforce pushing when doing a deployment could cause catastrophic accidents, like deploying something to a production environment instead of a scratch org or push-enabled sandbox.

What are you trying to do
I am trying to push metadata to a scratch org or Source Tracked sandbox, but the command sf project deploy start is exactly the same command used to do a deployment to production. I want to avoid accidentally deploying to a production environment, considering the CLI instruction is exactly the same.

Describe the solution you'd like
Create a switch on the sf project deploy start --enforce-source-tracked to enforce a push (or any alternative method), and it should fail if the org is not Source Tracked enabled.

Describe alternatives you've considered
I have a build task in VS Code to do the deployments to scratch org, and I recently changed it to sf project deploy start, I am going to be reverting this back to sfdx force source push --forceoverwrite --json because that errors out if the org is not Source Tracked.

Additional context
Yesterday I was working on a project and I needed some metadata to be included in my scratch org, so I connected to the production environment and retrieved it. Once it was retrieved I needed it to be pushed to my scratch org but I executed a sf project deploy start command without switching back to the scratch org first. Fortunately, the deployment failed because otherwise, I would be making those changes in production!

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIssue or pull request for a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions