Skip to content

Commit 1fab146

Browse files
authored
Fix potential unbound init-container name. (#85)
1 parent 3d2d029 commit 1fab146

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hooks/command

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ echo "Pod is running: $pod_name"
249249

250250
# not set or not empty - "" disables
251251
if [[ ! -v "BUILDKITE_PLUGIN_K8S_INIT_IMAGE" || -n "${BUILDKITE_PLUGIN_K8S_INIT_IMAGE}" ]]; then
252-
echo "--- :kubernetes: Running init-container image: ${BUILDKITE_PLUGIN_K8S_INIT_IMAGE}"
252+
echo "--- :kubernetes: Running init-container image: ${BUILDKITE_PLUGIN_K8S_INIT_IMAGE:-}"
253253
tail_logs "$pod_name" "bootstrap" "$bootstrap_container_log_complete_marker_file"
254254
fi
255255

256-
echo "+++ :kubernetes: Running image: ${BUILDKITE_PLUGIN_K8S_IMAGE}"
256+
echo "+++ :kubernetes: Running image: ${BUILDKITE_PLUGIN_K8S_IMAGE:-}"
257257
tail_logs "$pod_name" "step" "$step_container_log_complete_marker_file" &
258258

259259
counter="$timeout"

0 commit comments

Comments
 (0)