Commit e537449
committed
fix(xlings): build the install_packages args with the JSON library
`[xlings] deps` is manifest input and the arguments were assembled by
formatting the strings into a JSON literal, so a dependency name containing a
quote or a backslash would emit malformed JSON. The failure would then surface
as an xlings parse error naming neither the manifest nor the key that caused
it.
nlohmann::json is already imported in this translation unit (mcpp.libs.json),
so this is `args["targets"] = declaredDeps; args["yes"] = true; args.dump()`
and the escaping stops being something a reader has to verify by eye.
No behaviour change for well-formed names, which is every name in practice --
this is about the failure mode of the one that is not.1 parent 5d32ba8 commit e537449
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3080 | 3080 | | |
3081 | 3081 | | |
3082 | 3082 | | |
3083 | | - | |
3084 | | - | |
3085 | | - | |
3086 | | - | |
3087 | | - | |
| 3083 | + | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
3088 | 3093 | | |
3089 | 3094 | | |
3090 | 3095 | | |
3091 | | - | |
3092 | | - | |
| 3096 | + | |
3093 | 3097 | | |
3094 | 3098 | | |
3095 | 3099 | | |
| |||
0 commit comments