diff options
-rw-r--r-- | buildstream/_options/option.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/buildstream/_options/option.py b/buildstream/_options/option.py index 05c56e582..dfc8d4040 100644 --- a/buildstream/_options/option.py +++ b/buildstream/_options/option.py @@ -64,6 +64,11 @@ class Option(): self.description = _yaml.node_get(node, str, 'description') self.variable = _yaml.node_get(node, str, 'variable', default_value='') or None + # Assert valid symbol name for variable name + if self.variable: + p = _yaml.node_get_provenance(node, 'variable') + _yaml.assert_symbol_name(p, self.variable, 'variable name') + # load_value() # # Loads the value of the option in string form. |