forcedotcom / cli

Salesforce CLI
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/
BSD 3-Clause "New" or "Revised" License
486 stars 78 forks source link

Uninstalling salesforcedx plug-in doesn't actually uninstall #386

Closed keirbowden closed 3 years ago

keirbowden commented 4 years ago

Summary

After uninstalling the salesforcedx plug-in, all the force commands still work and the plug-in is still shown with the --core flag.

Steps To Reproduce:

  1. Run sfdx plugins:uninstall salesforcedx
  2. Receive message that the plug-in is uninstalling
  3. Run sfdx force:apex:class:create -n TestClass
  4. Test class created without issue

Expected result

Force commands no longer available.

Actual result

Force commands succeed. Further, running sfdx plugins --core shows that the latest version is still installed.

Additional information

I don't really see this as a bug, but it's unexpected behaviour and I'm curious if it is intentional - removing this plug-in is something I only try if there are problems or I'm on a pre-release and want to upgrade.

SFDX CLI Version(to find the version of the CLI engine run sfdx --version): 7.56.1

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core) 48.12

OS and version: MacOS 10.15.4

keirbowden commented 4 years ago

I tried downgrading to 46.16.0 and uninstalling that. I got a bunch of messages about it being uninstalled, and when I checked I was back on 48.12. It seems that uninstalling reverts to the latest version of the plug-in that I have locally.

shetzel commented 4 years ago

You can't uninstall a core plugin, which is by design. If you don't want the sfdx core plugins then you probably just want the oclif CLI.

If you have a specific version of an sfdx core plugin installed, i.e., not the version bundled with the CLI, then uninstalling will take you back to the plugin version corresponding to the CLI version you have.

I think a potential improvement would be to provide a better message when trying to uninstall a core plugin. @clairebianchi - any thoughts?

xyc commented 4 years ago

@shetzel The developer documentation mentions "Uninstall the salesforcedx Plug-In" as well https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_uninstall.htm

shetzel commented 4 years ago

@xyc If you have a non-core version of the salesforcedx plugin you can uninstall it that way.

mshanemc commented 3 years ago

We're retiring the salesforcedx plugin plugin soon https://github.com/forcedotcom/cli/issues/1016

so I'm closing this. We have a low-priority WI to tell people they can't uninstall a core plugin (they can uninstall a version of a core plugin that isn't the bundled version, but that just gets them back to the bundled version).