Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel installation when not elevated #3582

Open
2 tasks done
JasonCraneAdkins opened this issue Dec 3, 2024 · 5 comments
Open
2 tasks done

Cancel installation when not elevated #3582

JasonCraneAdkins opened this issue Dec 3, 2024 · 5 comments

Comments

@JasonCraneAdkins
Copy link

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my request.

Is Your Feature Request Related To A Problem? Please describe.

Using Sudo to elevate command shell.
I'm using gsudo for a while to elevate the command shell, also with 24H2 windows has its own sudo feature.

Chocolatey usualy just get a error message and installs the software anyways.
FM: "Chocolatey detected you are not running from an elevated command shell"

This message is in a very unobtrusive color and does not need to be confirmed individually.

Describe The Solution. Why is it needed?

An Option to configure how to handle this situation.

There are two Option that would be viable.

  1. Cancel the installation at all (Prevent any installation without elevated command shell)
  2. Give a more Prominent /Error Color) Error Message that you have to agree to separately

Additional Context

No response

Related Issues

No response

@JPRuskin
Copy link
Member

JPRuskin commented Dec 3, 2024

I'm unsure if we're seeing the same message!

Image

I'm seeing a pretty prominently coloured message (no other messages are in the same colour, to my memory) that needs a separate agreement, and won't continue until you continue (or not).

Am I misinterpreting your request?

@JasonCraneAdkins
Copy link
Author

with Appearance Campbell, it looks like this
Image

But the main Topic is to completely abort the installation if there are no elevated permission

@pauby
Copy link
Member

pauby commented Dec 8, 2024

But the main Topic is to completely abort the installation if there are no elevated permission

That would be a user decision. This is why the message, and the prompt, are there.

@JasonCraneAdkins
Copy link
Author

A user decision on this step only creates unnecessary problems.
At least an option to configure chocolatey to automatically cancel installations without elevation should be there.
And to be honest, that Option should be the standard

@pauby
Copy link
Member

pauby commented Dec 17, 2024

A user decision on this step only creates unnecessary problems.

Which problems does it create?

At least an option to configure chocolatey to automatically cancel installations without elevation should be there.

There are instances where Chocolatey CLI can be and are used without running in an elevated session. If there was an option, then users would have to turn it off and on again, if they were using it. Or we would need to implement options that you could add to the command line to switch it off for that one run. This is a lot of extra work for very little extra gain by a small handful of users.

Software should not always make guesses at what the user intended to do. If you are using any open-source tool, you need to ensure you are using it in the correct context.

And to be honest, that Option should be the standard

I disagree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants