From 0734dad7b58f0af8bc49666142c201e73e47e7b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 15 Aug 2023 18:36:26 +0200 Subject: [PATCH] Skip json files that do not conform to the format we expect We could try to work around this by accepting both bool and string, but for now there is only one occurrence of this problem. --- datasource/appledb.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datasource/appledb.go b/datasource/appledb.go index 8f7664f..dd07e89 100644 --- a/datasource/appledb.go +++ b/datasource/appledb.go @@ -108,7 +108,8 @@ func QueryAppleDB(config Config) (DatasourceOutputs, error) { var osFile OsFile if err := json.Unmarshal(dat, &osFile); err != nil { - return err + log.Printf("Skipping %s (%s)", path, err) + return nil } if osFile.OS != config.OS {