diff options
-rw-r--r-- | lib/spack/spack/config.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 2067c6146e..8babb356b4 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -246,6 +246,13 @@ section_schemas = { 'type': 'object', 'additionalProperties': False, 'definitions': { + 'array_of_strings': { + 'type': 'array', + 'default': [], + 'items': { + 'type': 'string' + } + }, 'dependency_selection': { 'type': 'string', 'enum': ['None', 'Direct', 'All'] @@ -273,7 +280,14 @@ section_schemas = { 'prerequisites': {'$ref': '#/definitions/dependency_selection'}, 'environment': { 'type': 'object', - 'default': {} + 'default': {}, + 'additionalProperties': False, + 'properties': { + 'set-env': {'$ref': '#/definitions/array_of_strings'}, + 'unset-env': {'$ref': '#/definitions/array_of_strings'}, + 'prepend-path': {'$ref': '#/definitions/array_of_strings'}, + 'append-path': {'$ref': '#/definitions/array_of_strings'} + } } } }, |