JeevanJames/GitOpsConfig

Add support for null and undefined variable values

Closed this issue · 2 comments

NULL is a valid variable value, which translates to an empty string for strings, 0 for numbers and false for booleans. Alternatively, scriban templates can explicitly check for NULL values.

UNDEFINED variables are invalid variables. After resolving the variables, if any variable is UNDEFINED, then an error should be thrown. UNDEFINED is useful to define a variable at a root-level folder, but we don't have a value at that level.

In the variables.ini file, we can define these values with special keywords:

[Section]
ANullValue = _NULL_
AnUndefinedValue = _UNDEFINED_

Implemented support for undefined variables with _UNDEFINED_

Cannot find a valid usage for NULL. Closing this issue with only UNDEFINED variables implemented.

We'll revisit NULL support in the future, if needed.