mirror of
https://github.com/artegoser/ONLang
synced 2024-12-22 17:13:46 +03:00
fix: convertation to yaml
This commit is contained in:
parent
4bf6169781
commit
16aad56fce
1 changed files with 3 additions and 2 deletions
|
@ -132,7 +132,8 @@ impl Interpreter {
|
|||
write!(
|
||||
output,
|
||||
"{}",
|
||||
serde_yaml::to_string(&self.commands).expect("Error when convert to yaml")
|
||||
serde_yaml::to_string(&json! ({"main": self.commands}))
|
||||
.expect("Error when convert to yaml")
|
||||
)
|
||||
.expect("Error when writing to file");
|
||||
|
||||
|
@ -144,7 +145,7 @@ impl Interpreter {
|
|||
write!(
|
||||
output,
|
||||
"{}",
|
||||
serde_json::to_string(&self.commands).expect("Error when convert to json")
|
||||
serde_json::to_string_pretty(&self.commands).expect("Error when convert to json")
|
||||
)
|
||||
.expect("Error when writing to file");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue