2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-11-28 21:33:48 +00:00
bazel-lib/lib/private/parse_status_file.jq

6 lines
335 B
Plaintext
Raw Normal View History

2022-08-22 17:59:38 +00:00
[
split("\n")[] # Convert lines to array
| capture("(?<key>[^\\s]+)\\s+(?<value>.*)"; "x") # capture {"key": [everything before first whitespace], "value": [remainder of line]}
]
| from_entries # Convert [{"key": "a", "value": "b"}] to map {"a": "b"}