From 1da4ccb9241aa37ee08f82df688b2c1f0377cc49 Mon Sep 17 00:00:00 2001 From: Yuping Zuo Date: Thu, 12 Sep 2019 10:11:31 +0800 Subject: [PATCH] Add version information for mandatory variable syntax The mandatory variable syntax is only available in docker-compose 1.19+ (docker/compose#5531). However, no new compose file version was created to reflect this change, nor is this documented. --- _includes/content/compose-var-sub.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_includes/content/compose-var-sub.md b/_includes/content/compose-var-sub.md index 4c333daab554..6b50d44c1098 100644 --- a/_includes/content/compose-var-sub.md +++ b/_includes/content/compose-var-sub.md @@ -34,7 +34,8 @@ provide inline default values using typical shell syntax: - `${VARIABLE-default}` evaluates to `default` only if `VARIABLE` is unset in the environment. -Similarly, the following syntax allows you to specify mandatory variables: +Similarly, the following syntax allows you to specify mandatory variables when +using **Compose 1.19.0+** or `docker stack deploy` **18.04.0+**: - `${VARIABLE:?err}` exits with an error message containing `err` if `VARIABLE` is unset or empty in the environment.