-
Notifications
You must be signed in to change notification settings - Fork 907
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
(#72) Add ability to include sources from config #2649
(#72) Add ability to include sources from config #2649
Conversation
The name of the switch The issue talks about |
That is what the configured sources are called internally in the code, which is why I picked that.
Fair enough, that is pulled from the original issue. I'm completely open to options for the name of the switch. |
3846706
to
c3507da
Compare
c3507da
to
ba9d347
Compare
I've updated the switch name to |
ba9d347
to
21f2ca0
Compare
21f2ca0
to
b69fbad
Compare
802b076
to
7d0364b
Compare
1ed4d11
to
ab36aac
Compare
ab36aac
to
661fe5e
Compare
c850157
to
2b4621c
Compare
2b4621c
to
a7c9558
Compare
4750e0f
to
a74edc7
Compare
What about |
Sounds good to me. Should I switch it over to that? |
628346d
to
8ad3464
Compare
This adds the --include-configured-sources switch which will append any sources in the config to manually specified sources (via --source). It checks if the source already exists before appending, which prevents duplication when the manually specified sources and the sources from config are combined.
Alternate Sources -> Alternative Sources
8ad3464
to
c2e08b0
Compare
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.
LGTM!
@TheCakeIsNaOH thanks, again, for all your work here! Really appreciate it! |
Description Of Changes
This adds the --include-configured-sources switch which will append
any sources in the config to manually specified sources (via --source).
It checks if the source already exists before appending, which prevents
duplication when the manually specified sources and the sources from
config are combined.
Motivation and Context
When testing a package locally, it may have depencies that are not installed, and available on a remote repository, like the Community Repository. This allows installation/upgrading of the package without having to specify that remote repository explicitly in
--source
, assuming it is in the sources configured with the source command.Testing
Validate that the switch is ignored when using an alternate source:
.\choco.exe install nonexistant-package --source=python --include-configured-sources
Output should include this message:
Not including sources from config because python is an alternate source
Validate that config sources are not included when not using switch:
.\choco.exe install nonexistant-package --source .
Output error should specify source as
'.'
, and not include the default community repository.Validate that config sources are included when using switch:
.\choco.exe install nonexistant-package --source . --include-configured-sources
Output error should specify sources as
'.;https://community.chocolatey.org/api/v2/'
Validate that config sources are not duplicated if included both in
--source
and config:.\choco.exe install nonexistant-package --source="https://community.chocolatey.org/api/v2/" --include-configured-sources
Output error should specify source as
'https://community.chocolatey.org/api/v2/'
Change Types Made
Related Issue
Fixes #72
Change Checklist