Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit b1ac7f0

Browse files
committed
[Core] Fixes #655. Downgrade a match-match on the command line version specifier when there are no packages at all of that name, to a warning. It's essentially redundant, and thus ignored, and not worthy of an error (and the test harness fails in some cases with this)
1 parent 365ea14 commit b1ac7f0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Bam.Core/Package/PackageUtilities.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,11 @@ private static void
448448
{
449449
var matches = rootNode.MatchingPackages(specifier.First());
450450
var matchingVersions = matches.Select(item => item.Version);
451+
if (!matchingVersions.Any())
452+
{
453+
Log.Info($"Warning: Command line version specifier --{specifier.First()}.version={specifier.Last()} is redundant. Ignoring.");
454+
continue;
455+
}
451456
if (!matchingVersions.Contains(specifier.Last()))
452457
{
453458
var message = new System.Text.StringBuilder();

Changelog.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
04-Sep-2019 Fixes #654. Cannot use macros in 'ClCompile Include="path"' style .vcxproj elements, as it's not guaranteed to work. See https://docs.microsoft.com/en-us/cpp/build/reference/vcxproj-file-structure?view=vs-2015.
44

5-
04-Sep-2019 Fixes #655. Fixed regression that specifying a package version on the command line that did not match any package versions in the definition file was silently ignored.
5+
04-Sep-2019 Fixes #655. Fixed regression that specifying a package version on the command line that did not match any package versions in the definition file was silently ignored. If there are no packages of that name in the definition file, this is only a warning, otherwise, it is an error.
66

77
01-Sep-2019 Fixes #650. Updated the following Nugets:
88
* Microsoft.Extensions.Configuration.EnvironmentVariables to 2.2.4

0 commit comments

Comments
 (0)