mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-05 15:32:49 +00:00
config-schema: schema wrongly allowed ui.pager.command
to be a string
While `ui.pager` can be a string which will be tokenized on whitespace, and argument token array, or a command/env table, the `command` key within that table currently must be an array. The schema previously explicitly also allowed it to be a string but that does not actually work, as exemplified by running: ```sh $ jj --config-file cli/tests/sample-configs/invalid/ui.pager_command-env_string.toml config list Config error: Invalid type or value for ui.pager Caused by: data did not match any variant of untagged enum CommandNameAndArgs ``` `CommandNameAndArgs` should potentially be changed to allow strings. For now, the schema has been updated to reflect the status quo. A new sample toml has been added to the `invalid` directory to cover this; prior to updating the schema, this new test case failed. Once the behavior is changed to allow string, the file merely needs to be moved to `valid`.
This commit is contained in:
parent
d4024e0d92
commit
5444067c37
@ -51,7 +51,7 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"command": {
|
||||
"type": ["array", "string"],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
|
@ -0,0 +1,3 @@
|
||||
#:schema ../../../src/config-schema.json
|
||||
[ui.pager]
|
||||
command = "bat -p"
|
Loading…
x
Reference in New Issue
Block a user