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

Source config implementation #101

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@LucidSage
Contributor

LucidSage commented Jun 5, 2012

I have removed the source argument defaults used in all the functions.
I have added a new Get-SourceArgument function to wrap the logic for handling the source argument generation.
This new function is then used in Chocolatey-List, Chocolatey-Version, and Run-Get functions.

Basic logic used in Get-SourceArgument:

  • if the user supplied a source, use it
  • if the useNuGetForSources flag is true, do not set the source argument, which will let NuGet handle it.
  • otherwise read the sources out of the chocolatey.config file and use those.
@@ -5,9 +5,6 @@ param(
)
$srcArgs = "-source $source"
if ($source -like 'https://go.microsoft.com/fwlink/?LinkID=230477') {
$srcArgs = "-source http://chocolatey.org/"

This comment has been minimized.

@ferventcoder

ferventcoder Jun 5, 2012

Member

Still need it to default to chocolatey as a source...

This comment has been minimized.

@LucidSage

LucidSage Jun 5, 2012

Contributor

The parameter defaults to chocolatey already:
[string] $source = 'http://chocolatey.org/'

Is this not sufficient? Just let me know if this needs to be backed out.

This comment has been minimized.

@ferventcoder

ferventcoder Jun 5, 2012

Member

My bad. I didn't RTFM, just the line above... :D

@ferventcoder

This comment has been minimized.

Member

ferventcoder commented Jun 5, 2012

It's so much cleaner than all of that stuff I was doing... :D

@ghost ghost assigned ferventcoder Jun 5, 2012

@LucidSage

This comment has been minimized.

Contributor

LucidSage commented Jun 5, 2012

Glad I can help. It was a good experience for me to get more familiar with git too. I appreciate it!

@ferventcoder

This comment has been minimized.

Member

ferventcoder commented Jun 6, 2012

This is in. Thanks!

@LucidSage

This comment has been minimized.

Contributor

LucidSage commented Jun 6, 2012

Cool! Glad I could help :)

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