mirror of
https://github.com/cirruslabs/tart.git
synced 2026-09-29 18:51:19 +02:00
VMConfig: save pretty-printed JSON
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user