Commit 8123714
authored
The jq `//` (alternative) operator treats both `null` and `false` as
falsy, so a stored boolean `false` would return empty string instead of
`"false"`. Fixed by replacing with an explicit `has()` check.
Though in practice, no callers of `get_previously()` retrieve boolean
fields, so currently nothing was affected by this.
Also use `--arg` for the jq key parameter in both `build_data::has()`
and `build_data::get_previous()`, instead of string interpolation, for
consistency with `build_data::_set()`, and to avoid issues if the key
name contained any special characters (though in practice they
shouldn't given the names aren't user controlled).
GUS-W-21977968.
GUS-W-21977978.
1 parent ab1d03f commit 8123714
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
0 commit comments