-
Notifications
You must be signed in to change notification settings - Fork 905
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
(GH-274) Allow unattended installs as non-admin user #273
(GH-274) Allow unattended installs as non-admin user #273
Conversation
Howdy - have you had a chance to review CONTRIBUTING.md? |
What version of choco were you running before? We've removed the admin requirement for a bunch of commands, including unpackself. |
@ferventcoder Hey, I had a brief look - my understanding was that PRs were fine for small changes. Was there anything else I needed to do? As for which version I'm running - I'm running 0.9.9.5. I think the main problem here isn't so much the admin requirement as much as the interactive prompt that the command throws up. It blocks fully automated installations, which is important for a continuous integration script I'm working on. Thanks for taking a look at this so quickly by the way :) |
Then I think it should pass |
I didn't think |
Yes, there is an extensive section on the git commit message. We need to be sticklers there because it makes searching later down the line much easier if commits are formatted correctly with the correct tags on them. |
@ferventcoder Indeed, Potentially we could pass My understanding is that I'll update the commit message - thanks for the pointer :) |
@smspillaz in the case of unpackself, there is no reason not to have it |
Apparently I set that. But it needs to run silently, otherwise it breaks choco conventions, that is why it should go with |
$chocoNew = Join-Path $thisScriptFolder 'chocolateyInstall\choco.exe' | ||
if ($debugMode) { | ||
& $chocoNew unpackself -fdv | ||
& $chocoNew unpackself -fdv $allowGlobalConfirmation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes me think we should set $debugMode as '-dv'
and only have one command there instead of two. But also that we should always use -y
. If the script stops for any reason, it is breaking Chocolatey conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Shall I just add -y
everywhere then?
Filed issue #274 for the commit message. |
Sweet, let me know when you update the commit and repush it, plus the fixes I requested. :) |
I love your first commit message - https://github.com/chocolatey/choco/pull/273/commits - well formed but needs to remove the word I might be getting ahead of you here, you are probably already on making the changes. :) |
4a73ef3
to
5ab9c05
Compare
@ferventcoder Cool. I've squashed down to two commits (one for the change, one for the cleanup recommended) ...... aaaannd CI just failed. Do you want those two in separate commits or just one? |
hahaha, it was in the |
Haha, I guess that is true, the nuget package. :) |
@@ -314,9 +310,9 @@ param( | |||
Copy-Item $chocoExe $chocoExeDest -force | |||
|
|||
if ($debugMode) { | |||
& $chocoExeDest unpackself -fdv | |||
& $chocoExeDest unpackself -fdvy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh weird, I missed this. Hang on.
Nah, those two things are separate ideas. I don't believe in squashing separate distinct things into one commit. |
5ab9c05
to
d7894b2
Compare
Oh, I need to update the commit message for the first commit. Hang tight. |
Previously, if a non-admin user attempted to install chocolatey, a message indicating that non-admin installs were for advanced users only would appear and block the installation. This runs contrary to chocolatey policy, so just pass -y during the unpackself command. The installation should never block.
Previously we had an if condition on debugMode, but it is more concise to just express it as a string appended to the list of options passed to choco.
d7894b2
to
46d01f6
Compare
(you can cancel all the backed up builds on appveyor by the way, there's probably quite a few O.o) |
Yeah, I better do that. :) |
I didn't see debugMode used anywhere else, no |
@ferventcoder Looks like its all passing (travis-ci is broken by a bad mono package is seems). |
@smspillaz travis-ci has issues sometimes. |
@ferventcoder What's the timeline for getting these changes merged in? I'm waiting to start work on one of my own projects that will use choco under the hood. |
This is going into 0.9.9.6, which will be releasing pretty soon. |
Merged into stable at ae68a69 to be released with 0.9.9.6. |
Previously, if a non-admin user attempted to install chocolatey,
a message indicating that non-admin installs were for advanced
users only would appear and block the installation.
This runs contrary to chocolatey policy, so just pass -y during
the unpackself command. The installation should never block.
This closes #274