mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
fix decoding empty SettingPreset
This commit is contained in:
@@ -53,6 +53,10 @@ extension JSONObjectConvertible {
|
||||
|
||||
public init(path: Path) throws {
|
||||
let content: String = try path.read()
|
||||
if content == "" {
|
||||
try self.init(jsonDictionary: [:])
|
||||
return
|
||||
}
|
||||
let yaml = try Yams.load(yaml: content)
|
||||
guard let jsonDictionary = yaml as? JSONDictionary else {
|
||||
throw JSONUtilsError.fileNotAJSONDictionary
|
||||
|
||||
Reference in New Issue
Block a user