cli icon indicating copy to clipboard operation
cli copied to clipboard

sf org delete scratch also deletes sandboxes

Open dschibster opened this issue 4 months ago • 5 comments

Summary

Using the sf org delete scratch command while using a Sandbox as your default org will also delete the target org even if it is not a scratch org.

Steps To Reproduce

  • Auth with a Sandbox (Full, PC or Dev does not matter)
  • Set it as target org in VS Code
  • Use org delete scratch command

Expected result

Report back that I am not able to delete a Sandbox with the delete scratcg command

Actual result

Org gets deleted

Additional information

Wondering why there even are separate commands if there is no failsafe for sandboxes getting deleted with scratch command.

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.61.8",
  "nodeVersion": "node-v22.9.0",
  "osVersion": "Darwin 23.6.0",
  "rootPath": "/opt/homebrew/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.5 (core)",
    "@oclif/plugin-commands 4.0.16 (core)",
    "@oclif/plugin-help 6.2.13 (core)",
    "@oclif/plugin-not-found 3.2.22 (core)",
    "@oclif/plugin-plugins 5.4.10 (core)",
    "@oclif/plugin-search 1.2.10 (core)",
    "@oclif/plugin-update 4.5.10 (core)",
    "@oclif/plugin-version 2.2.14 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.18 (core)",
    "@oclif/plugin-which 3.2.15 (core)",
    "@salesforce/cli 2.61.8 (core)",
    "apex 3.5.0 (core)",
    "api 1.2.2 (core)",
    "auth 3.6.65 (core)",
    "data 3.6.8 (core)",
    "deploy-retrieve 3.12.15 (core)",
    "info 3.4.9 (core)",
    "limits 3.3.32 (core)",
    "marketplace 1.2.26 (core)",
    "org 4.6.0 (core)",
    "packaging 2.4.5 (user)",
    "schema 3.3.34 (core)",
    "settings 2.3.23 (core)",
    "signups 2.0.13 (link) /opt/homebrew/lib/node_modules/@salesforce/plugin-signups",
    "sobject 1.4.40 (core)",
    "source 3.5.21 (core)",
    "telemetry 3.6.15 (core)",
    "templates 56.3.21 (core)",
    "trust 3.7.32 (core)",
    "user 3.5.32 (core)",
    "sfdmu 4.33.17 (user)",
    "sfdx-git-delta 5.40.0 (user)",
    "sfdx-hardis 4.52.0 (user)"
  ]
}

dschibster avatar Oct 14 '24 15:10 dschibster