docker stack deploy interpolation format error due to not escaping $ now includes a hint
| ... | ... |
@@ -39,7 +39,7 @@ func interpolateSectionItem( |
| 39 | 39 |
interpolatedValue, err := recursiveInterpolate(value, mapping) |
| 40 | 40 |
if err != nil {
|
| 41 | 41 |
return nil, fmt.Errorf( |
| 42 |
- "Invalid interpolation format for %#v option in %s %#v: %#v", |
|
| 42 |
+ "Invalid interpolation format for %#v option in %s %#v: %#v. You may need to escape any $ with another $.", |
|
| 43 | 43 |
key, section, name, err.Template, |
| 44 | 44 |
) |
| 45 | 45 |
} |
| ... | ... |
@@ -55,5 +55,5 @@ func TestInvalidInterpolation(t *testing.T) {
|
| 55 | 55 |
}, |
| 56 | 56 |
} |
| 57 | 57 |
_, err := Interpolate(services, "service", defaultMapping) |
| 58 |
- assert.EqualError(t, err, `Invalid interpolation format for "image" option in service "servicea": "${"`)
|
|
| 58 |
+ assert.EqualError(t, err, `Invalid interpolation format for "image" option in service "servicea": "${". You may need to escape any $ with another $.`)
|
|
| 59 | 59 |
} |