Skip to content

Commit

Permalink
NuGet.Configuration.Settingsにファイル名を指定するようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
yuto-trd committed Feb 14, 2024
1 parent 7b2d7e1 commit dd849be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Beutl.Api/Services/PackageInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public PackageInstaller(HttpClient httpClient, InstalledPackageRepository instal
_httpClient = httpClient;
_installedPackageRepository = installedPackageRepository;

string configPath = Path.Combine(Helper.AppRoot, "nuget.config");
const string ConfigFileName = "nuget.config";
string configPath = Path.Combine(Helper.AppRoot, ConfigFileName);
if (File.Exists(configPath))
{
using (StreamReader reader = File.OpenText(configPath))
Expand All @@ -84,7 +85,7 @@ public PackageInstaller(HttpClient httpClient, InstalledPackageRepository instal

LoadSettings:
//_settings = Settings.LoadDefaultSettings(Helper.AppRoot);
_settings = new Settings(Helper.AppRoot);
_settings = new Settings(Helper.AppRoot, ConfigFileName);
_packageSourceProvider = new PackageSourceProvider(_settings);

_sourceRepositoryProvider = new SourceRepositoryProvider(_packageSourceProvider, Repository.Provider.GetCoreV3());
Expand Down

0 comments on commit dd849be

Please sign in to comment.