1
0
mirror of https://github.com/hack-chat/main.git synced 2024-03-22 13:20:33 +08:00

Merge pull request #63 from MinusGix/patch-4

When saving Config, format it in a more human readable manner.
This commit is contained in:
marzavec 2019-04-27 15:38:47 -07:00 committed by GitHub
commit 9a230deaf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,10 @@ class ConfigManager {
const backupPath = await this.backup();
try {
fse.writeJSONSync(this.configPath, this.config);
fse.writeJSONSync(this.configPath, this.config, {
// Indent with two spaces
spaces: 2,
});
fse.removeSync(backupPath);
return true;