chore: write manifests using new safer method

This commit is contained in:
goat 2023-09-29 18:39:36 +02:00
parent 416bb42f5b
commit 33abb5ec42
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -836,7 +836,7 @@ internal partial class PluginManager : IDisposable, IServiceType
var manifestFile = LocalPluginManifest.GetManifestFile(dllFile);
// We need to save the repoManifest due to how the repo fills in some fields that authors are not expected to use.
File.WriteAllText(manifestFile.FullName, JsonConvert.SerializeObject(repoManifest, Formatting.Indented));
Util.WriteAllTextSafe(manifestFile.FullName, JsonConvert.SerializeObject(repoManifest, Formatting.Indented));
// Reload as a local manifest, add some attributes, and save again.
var manifest = LocalPluginManifest.Load(manifestFile);