Skip to content

Commit 1b6c0c7

Browse files
committed
Recognise NU1801 in addition to NU1301
1 parent 9a9f88a commit 1b6c0c7

File tree

1 file changed

+2
-1
lines changed
  • csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching

1 file changed

+2
-1
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/IDotNet.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public partial record class RestoreResult(bool Success, IList<string> Output)
2727
private readonly Lazy<IEnumerable<string>> restoredProjects = new(() => GetFirstGroupOnMatch(RestoredProjectRegex(), Output));
2828
public IEnumerable<string> RestoredProjects => Success ? restoredProjects.Value : Array.Empty<string>();
2929

30-
private readonly Lazy<bool> hasNugetPackageSourceError = new(() => Output.Any(s => s.Contains("NU1301")));
30+
// NU1301 is the error and NU1801 is the equivalent warning.
31+
private readonly Lazy<bool> hasNugetPackageSourceError = new(() => Output.Any(s => s.Contains("NU1301") || s.Contains("NU1801")));
3132
public bool HasNugetPackageSourceError => hasNugetPackageSourceError.Value;
3233

3334
private readonly Lazy<bool> hasNugetNoStablePackageVersionError = new(() => Output.Any(s => s.Contains("NU1103")));

0 commit comments

Comments
 (0)