Skip to content

Commit 61254c0

Browse files
Random-Liuestesp
authored andcommitted
Use local env to avoid writing to passed-in readonly env.
Signed-off-by: Lantao Liu <[email protected]>
1 parent 8162149 commit 61254c0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

contrib/gce/configure.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ disabled_plugins = ["restart"]
181181
EOF
182182
chmod 644 "${config_path}"
183183

184-
# CONTAINERD_EXTRA_RUNTIME_HANDLER is the extra runtime handler to install.
185-
CONTAINERD_EXTRA_RUNTIME_HANDLER=${CONTAINERD_EXTRA_RUNTIME_HANDLER:-""}
186-
if [[ -n "${CONTAINERD_EXTRA_RUNTIME_HANDLER}" ]]; then
184+
# containerd_extra_runtime_handler is the extra runtime handler to install.
185+
containerd_extra_runtime_handler=${CONTAINERD_EXTRA_RUNTIME_HANDLER:-""}
186+
if [[ -n "${containerd_extra_runtime_handler}" ]]; then
187187
cat >> ${config_path} <<EOF
188-
[plugins.cri.containerd.runtimes.${CONTAINERD_EXTRA_RUNTIME_HANDLER}]
188+
[plugins.cri.containerd.runtimes.${containerd_extra_runtime_handler}]
189189
runtime_type = "${CONTAINERD_EXTRA_RUNTIME_TYPE:-io.containerd.runc.v1}"
190190
191-
[plugins.cri.containerd.runtimes.${CONTAINERD_EXTRA_RUNTIME_HANDLER}.options]
191+
[plugins.cri.containerd.runtimes.${containerd_extra_runtime_handler}.options]
192192
${CONTAINERD_EXTRA_RUNTIME_OPTIONS:-}
193193
EOF
194194
fi

0 commit comments

Comments
 (0)