mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Merge pull request #13687 from tamasvajk/standalone/nugetconfig
C#: Use `nuget.config` file for `dotnet restore` fallback logic
This commit is contained in:
@@ -56,9 +56,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