file-cache: use the right exception type for parse error
``` error: [json.exception.parse_error.101] parse error at 195: syntax error - invalid string: ill-formed UTF-8 byte; last read: '"bokml'; expected string literal ``` This is most probably caused by the upgrade in nixos-org-configurations/1b74e019b166d37a1510a99aeea86a0fa656854a that, in turn, caused nlohmann_json to go from 2.1.0 -> 3.2.0 I haven't found concrete evidence in the changelog as to a change changing the exception type. Though, the timing for failures matches with this update. Furthermore, once this fix is applied, launching the update locally works fine.
This commit is contained in:
parent
90fcc7be84
commit
0effeee537
|
@ -140,7 +140,7 @@ public:
|
|||
throw Error("NAR index for ‘%s’ has an unsupported version", storePath);
|
||||
|
||||
recurse("", ls.at("root"));
|
||||
} catch (std::invalid_argument & e) {
|
||||
} catch (json::parse_error & e) {
|
||||
// FIXME: some filenames have non-UTF8 characters in them,
|
||||
// which is not supported by nlohmann::json. So we have to
|
||||
// skip the entire package.
|
||||
|
|
Loading…
Reference in a new issue