mirror of
https://github.com/github/codeql.git
synced 2025-12-23 20:26:32 +01:00
C#: Use nuget.config file for dotnet restore fallback logic
This commit is contained in:
@@ -45,9 +45,11 @@ namespace Semmle.BuildAnalyser
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool RestoreToDirectory(string projectOrSolutionFile, string packageDirectory)
|
||||
public bool RestoreToDirectory(string projectOrSolutionFile, string packageDirectory, string? pathToNugetConfig = null)
|
||||
{
|
||||
var args = $"restore --no-dependencies \"{projectOrSolutionFile}\" --packages \"{packageDirectory}\" /p:DisableImplicitNuGetFallbackFolder=true";
|
||||
if (pathToNugetConfig != null)
|
||||
args += $" --configfile \"{pathToNugetConfig}\"";
|
||||
return RunCommand(args);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user