chocolatey / ChocolateyGUI

A delicious GUI for Chocolatey
https://docs.chocolatey.org/en-us/chocolatey-gui/
Apache License 2.0
1.65k stars 251 forks source link

Gracefully handle Chocolatey CLI not being installed #979

Open 29039 opened 1 year ago

29039 commented 1 year ago

Checklist

What You Are Seeing?

Unable to load Chocolatey GUI assembly. The type initializer for 'ChocolateyGui.Common.Windows.Bootstrapper' threw an exception.

OK

What is Expected?

Chocolatey GUI should just launch

How Did You Get This To Happen?

  1. Installed Windows Sandbox
  2. Install Chocolatey GUI 1.1.1 in the Windows Sandbox
  3. Launch Chocolatey GUI from the Start Menu

System Details

Installed Packages

N/A

Output Log

Under C:\ProgramData there is no "Chocolatey" folder, and the "Chocolatey GUI" folder only has an empty folder named "Config"

Additional Context

The error pops up several times, have to press OK each time.

If I then go ahead and install the CLI version of chocolatey then everything works fine. But isn't the whole point of a GUI application not to use CLI? So the GUI MSI installer should be installing the CLI version automatically.

gep13 commented 1 year ago

@29039 said... But isn't the whole point of a GUI application not to use CLI? So the GUI MSI installer should be installing the CLI version automatically.

You are correct when you say that the point is that a user can use a GUI, rather than use the CLI directly, however, there is still a hard requirement that Chocolatey CLI be installed, as the GUI is really just a wrapper around the CLI. As such, currently, there is a requirement that Chocolatey CLI be installed, and the GUI doesn't currently take responsibility for installing it. Was there something in our documentation that made you believe that this was the case?

29039 commented 1 year ago

The simple fact that it's called "GUI" gave me the expectation that I'd simply have to install the file and get a GUI, without needing the CLI. If I needed the CLI to get to the GUI, then it would be a totally pointless project, because the barrier to entry has not been lowered.

I am fine with the CLI, but sadly there are those out there who won't touch it and will install inferior alternatives because they are allergic to the CLI for some reason. I don't want to have to log onto their PC to run CMD and copy and paste some commands for them, I just want to say "Go install Chocolatey GUI", and they run the MSI file and that is that.

pauby commented 1 year ago

As there is nothing more for us to do here, I'm going to go ahead and close this, but we can reopen it if necessary.

pauby commented 1 year ago

Actually, we should handle this more gracefully than the exception that is thrown.

Perhaps a check that choco.exe is available and if not, information on what to do next would be better.

Unknown-Guy commented 1 year ago

Well, I just upgraded packages from the GUI and ended up with this error. The whole chocolatey installation seems bricked. I use chocolatey only from GUI so I did not even know there will be major upgrades.

Edit: these steps were needed to fix my issue https://github.com/chocolatey/choco/discussions/3173#discussioncomment-6238611