From 64ed5545437c1348b65b5f9a4298c2212d3d6419 Mon Sep 17 00:00:00 2001 From: Mohamed Akram Date: Wed, 13 May 2020 14:28:33 +0400 Subject: [PATCH] Allow empty default/error value in substitution --- podman_compose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/podman_compose.py b/podman_compose.py index b779a2a..b3ac14f 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -146,8 +146,8 @@ def fix_mount_dict(mount_dict, proj_name, srv_name): # $$ means $ var_re = re.compile(r'\$(\{(?:[^\s\$:\-\}]+)\}|(?:[^\s\$\{\}]+))') -var_def_re = re.compile(r'\$\{([^\s\$:\-\}]+)(:)?-([^\}]+)\}') -var_err_re = re.compile(r'\$\{([^\s\$:\-\}]+)(:)?\?([^\}]+)\}') +var_def_re = re.compile(r'\$\{([^\s\$:\-\}]+)(:)?-([^\}]*)\}') +var_err_re = re.compile(r'\$\{([^\s\$:\-\}]+)(:)?\?([^\}]*)\}') def dicts_get(dicts, key, fallback='', fallback_empty=False): """