From fb4d5aa7e6019df20075139468d924a18fc05fcb Mon Sep 17 00:00:00 2001 From: Brett Randall Date: Sun, 17 Mar 2019 14:38:24 +1100 Subject: [PATCH] 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 --- compose/config/interpolation.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compose/config/interpolation.py b/compose/config/interpolation.py index 0f878be14..18be8562c 100644 --- a/compose/config/interpolation.py +++ b/compose/config/interpolation.py @@ -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) )