mirror of https://github.com/cirruslabs/tart.git
VMConfig: save pretty-printed JSON
This commit is contained in:
parent
09a8109f4b
commit
348d977f09
|
|
@ -28,7 +28,9 @@ struct VMConfig: Encodable, Decodable {
|
|||
}
|
||||
|
||||
func save(toURL: URL) throws {
|
||||
try JSONEncoder().encode(self).write(to: toURL)
|
||||
let encoder = JSONEncoder()
|
||||
encoder.outputFormatting = .prettyPrinted
|
||||
try encoder.encode(self).write(to: toURL)
|
||||
}
|
||||
|
||||
init(from decoder: Decoder) throws {
|
||||
|
|
|
|||
Loading…
Reference in New Issue