Skip to content

Commit 2686026

Browse files
authored
Merge pull request github#21993 from michaelnebel/csharp/dropmono
C#: Only use `nuget.exe` on Windows or machines with Mono.
2 parents 1d69c30 + 142a72c commit 2686026

3 files changed

Lines changed: 372 additions & 308 deletions

File tree

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

Lines changed: 0 additions & 304 deletions
This file was deleted.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ public HashSet<AssemblyLookupLocation> Restore()
161161
reachableFeeds.UnionWith(reachableInheritedFeeds);
162162
}
163163

164-
using (var nuget = new NugetExeWrapper(fileProvider, legacyPackageDirectory, logger, IsDefaultFeedReachable))
164+
using (var packagesConfigRestore = PackagesConfigRestoreFactory.Create(fileProvider, legacyPackageDirectory, logger, IsDefaultFeedReachable))
165165
{
166-
var count = nuget.InstallPackages();
166+
var count = packagesConfigRestore.InstallPackages();
167167

168-
if (nuget.PackageCount > 0)
168+
if (packagesConfigRestore.PackageCount > 0)
169169
{
170-
compilationInfoContainer.CompilationInfos.Add(("packages.config files", nuget.PackageCount.ToString()));
170+
compilationInfoContainer.CompilationInfos.Add(("packages.config files", packagesConfigRestore.PackageCount.ToString()));
171171
compilationInfoContainer.CompilationInfos.Add(("Successfully restored packages.config files", count.ToString()));
172172
}
173173
}

0 commit comments

Comments
 (0)