File tree Expand file tree Collapse file tree
packages/cli-kit/src/public/node/toml Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,8 +69,9 @@ export class TomlFile {
6969 const patches = flattenToPatchEntries ( changes )
7070 const raw = await readFile ( this . path )
7171 const updated = updateTomlValues ( raw , patches )
72+ const parsed = this . decode ( updated )
7273 await writeFile ( this . path , updated )
73- this . content = this . decode ( updated )
74+ this . content = parsed
7475 }
7576
7677 /**
@@ -86,8 +87,9 @@ export class TomlFile {
8687 const keys = keyPath . split ( '.' )
8788 const raw = await readFile ( this . path )
8889 const updated = updateTomlValues ( raw , [ [ keys , undefined ] ] )
90+ const parsed = this . decode ( updated )
8991 await writeFile ( this . path , updated )
90- this . content = this . decode ( updated )
92+ this . content = parsed
9193 }
9294
9395 /**
@@ -102,6 +104,7 @@ export class TomlFile {
102104 */
103105 async replace ( content : JsonMapType ) : Promise < void > {
104106 const encoded = encodeToml ( content )
107+ this . decode ( encoded )
105108 await writeFile ( this . path , encoded )
106109 this . content = content
107110 }
You can’t perform that action at this time.
0 commit comments