Merge pull request #62801 from raulsntos/ensure-nuget-path-exists

This commit is contained in:
Rémi Verschelde 2022-07-07 12:23:35 +02:00 committed by GitHub
commit 72b3e81bdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,7 +99,7 @@ namespace GodotTools.Build
if (Utils.OS.IsWindows)
{
// %APPDATA% for both
return new[] {Path.Combine(applicationData, "NuGet", "NuGet.Config")};
return new[] { Path.Combine(applicationData, "NuGet", "NuGet.Config") };
}
var paths = new string[2];
@ -156,6 +156,7 @@ namespace GodotTools.Build
</packageSources>
</configuration>
";
System.IO.Directory.CreateDirectory(Path.GetDirectoryName(nuGetConfigPath));
System.IO.File.WriteAllText(nuGetConfigPath, defaultConfig, Encoding.UTF8); // UTF-8 with BOM
}