Help/presets: Disallow empty env keys in build presets also

Build presets have a non-standard environment variable definition in
the schema yaml since they need extra Sphinx content. However, it was
missing the rule to disallow empty keys that the base environment
variable definition has.
This commit is contained in:
Tyler Yankee
2026-05-01 13:18:41 -04:00
parent 096a676d13
commit c6e81bf30e
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -1856,6 +1856,9 @@
"buildPresets.environment@v2..": {
"type": "object",
"description": "An optional map of environment variables. The key is the variable name (which must not be an empty string). Each variable is set regardless of whether or not a value was given to it by the process's environment. This field supports macro expansion, and environment variables in this map may reference each other, and may be listed in any order, as long as such references do not cause a cycle (for example,if ENV_1 is $env{ENV_2}, ENV_2 may not be $env{ENV_1}.) Environment variables are inherited through the inherits field, and the preset's environment will be the union of its own environment and the environment from all its parents. If multiple presets in this union define the same variable, the standard rules of inherits are applied. Setting a variable to null causes it to not be set, even if a value was inherited from another preset.",
"propertyNames": {
"pattern": "^.+$"
},
"properties": {},
"additionalProperties": {
"anyOf": [
+2
View File
@@ -989,6 +989,8 @@ properties:
ExternalProject may use a different (system default) compiler than
the top-level CMake project.
properties: {}
propertyNames:
pattern: '^.+$'
additionalProperties: *environment-additional-properties
configurePreset:
type: string