From 6d0f1e279c2d9daa28d60a115e41cf68fbcb7fc3 Mon Sep 17 00:00:00 2001 From: Fernando Tirolo Gomes Date: Thu, 26 Nov 2015 12:14:11 +0000 Subject: [PATCH 1/2] (maint) Tiny update for the "Community tag" link Changed the link from "Community tag" to "Up for Grabs" --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d3309da04e..747801820e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ The process for contributions is roughly as follows: * Through GitHub, or through the [mailing list](https://groups.google.com/forum/#!forum/chocolatey) (preferred), you talk about a feature you would like to see (or a bug), and why it should be in Chocolatey. * If approved through the mailing list, ensure the accompanying GitHub issue is created with information and a link back to the mailing list discussion. * Once you get a nod from one of the [Chocolatey Team](https://github.com/chocolatey?tab=members), you can start on the feature. - * Alternatively, if a feature is on the issues list with the [community tag](https://github.com/chocolatey/choco/labels/Community), it is open for a patch. You should comment that you are signing up for it on the issue so someone else doesn't also sign up for the work. + * Alternatively, if a feature is on the issues list with the [Up For Grabs tag](https://github.com/chocolatey/choco/labels/Up%20For%20Grabs), it is open for a patch. You should comment that you are signing up for it on the issue so someone else doesn't also sign up for the work. ### Set Up Your Environment From 30040912559c4774f0d63d28048cb5937cb46142 Mon Sep 17 00:00:00 2001 From: Mike Foden Date: Fri, 15 Jan 2016 22:52:33 +1100 Subject: [PATCH 2/2] (GH-490) Exception if no source is enabled Previously if no sources were available during installation of a package, installation would fail with an Exception. This fix will make the choco client check the source list to make sure it is not null before attempting to install a package. --- .../services/ChocolateyPackageService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs index 356bc57480..dc34b6d349 100644 --- a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs +++ b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs @@ -304,10 +304,18 @@ public ConcurrentDictionary install_run(ChocolateyConfigu { this.Log().Info(@"Installing the following packages:"); this.Log().Info(ChocolateyLoggers.Important, @"{0}".format_with(config.PackageNames)); - this.Log().Info(@"By installing you accept licenses for the packages."); var packageInstalls = new ConcurrentDictionary(); + if (config.Sources == null) + { + this.Log().Error(ChocolateyLoggers.Important, @"Installation was NOT successful. There are no sources enabled for packages."); + Environment.ExitCode = 1; + return packageInstalls; + } + + this.Log().Info(@"By installing you accept licenses for the packages."); + foreach (var packageConfig in set_config_from_package_names_and_packages_config(config, packageInstalls).or_empty_list_if_null()) { Action action = null;