From 9bde02faf60ade22a3fb341ad82de90d6c03620e Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Fri, 15 Dec 2023 17:43:18 +0800 Subject: [PATCH] Fix envsubst issue --- backend/util-common.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/util-common.ts b/backend/util-common.ts index c7eabec..ddbcc65 100644 --- a/backend/util-common.ts +++ b/backend/util-common.ts @@ -385,7 +385,11 @@ function traverseYAML(pair : Pair, env : DotenvParseOutput) : void { if (item instanceof Pair) { traverseYAML(item, env); } else if (item instanceof Scalar) { - item.value = envsubst(item.value, env); + let value = item.value as unknown; + + if (typeof(value) === "string") { + item.value = envsubst(value, env); + } } } // @ts-ignore