Skip to content

Commit 849d1f7

Browse files
committed
Skip providing secrets if pipe does not exist
1 parent 230c1f1 commit 849d1f7

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

startupscript/butane/055-provide-secrets.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,10 @@ readonly ATTACHED_SECRETS
126126

127127
echo "Waiting for container to create named pipe..."
128128

129-
retries=0
130-
until docker exec "${CONTAINER_NAME}" sh -c "[ -p ${PIPE_PATH} ]" 2>/dev/null; do
131-
if (( retries >= 40 )); then
132-
>&2 echo "ERROR: Timed out waiting for container to create ${PIPE_PATH}"
133-
exit 1
134-
fi
135-
sleep 3
136-
(( retries++ ))
137-
done
129+
if ! docker exec "${CONTAINER_NAME}" sh -c "[ -p ${PIPE_PATH} ]" 2>/dev/null; then
130+
>&2 echo "Container not receinv secrets at ${PIPE_PATH}. Skipping secret provisioning."
131+
exit 0
132+
fi
138133

139134
# --- Build JSON secrets array for pipe delivery ---
140135
SECRETS_JSON="[]"

0 commit comments

Comments
 (0)