From 361ceaece1dd8176d23f8ee47639f562ec60bbab Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Tue, 4 Apr 2017 13:47:36 -0700 Subject: [PATCH] [infra] Escape $ in gcb builds. --- infra/gcb/build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infra/gcb/build.py b/infra/gcb/build.py index 44b86ff63..6a78849b2 100755 --- a/infra/gcb/build.py +++ b/infra/gcb/build.py @@ -111,7 +111,9 @@ def workdir_from_dockerfile(dockerfile): for line in lines: match = re.match(WORKDIR_REGEX, line) if match: - return match.group(1) + # We need to escape '$' since they're used for subsitutions in Container + # Builer builds. + return match.group(1).replace('$', '$$') return None