Include required but missing VAR name and assignment in interpolation error message.

Error message format is now e.g.:

ERROR: Missing mandatory value for "environment" option interpolating ['MYENV=${MYVAR:?}'] in service "myservice":

Fixed #6587.

Signed-off-by: Brett Randall <javabrett@gmail.com>
This commit is contained in:
Brett Randall 2019-03-17 14:38:24 +11:00
parent e806520dc3
commit fb4d5aa7e6
No known key found for this signature in database
GPG Key ID: 50EF8B0B7C04B29D
1 changed files with 6 additions and 6 deletions

View File

@ -64,12 +64,12 @@ def interpolate_value(name, config_key, value, section, interpolator):
string=e.string))
except UnsetRequiredSubstitution as e:
raise ConfigurationError(
'Missing mandatory value for "{config_key}" option in {section} "{name}": {err}'.format(
config_key=config_key,
name=name,
section=section,
err=e.err
)
'Missing mandatory value for "{config_key}" option interpolating {value} '
'in {section} "{name}": {err}'.format(config_key=config_key,
value=value,
name=name,
section=section,
err=e.err)
)