Files
Gan, Jimmy 59bdcf392c
Deploy Claude Dev (Dev) / deploy-claude-dev-dev (push) Successful in 1m32s
Run Tests / Secret Detection (pull_request) Failing after 1m0s
Run Tests / Backend Tests (pull_request) Failing after 2m33s
Run Tests / Frontend Tests (pull_request) Failing after 27s
fix: reconcile required-tools.txt smoke checks (S04.5)
- Replace openssh-client with ssh (checkable binary name)
- Remove socat (not a claude-dev container dependency)
- Handle ca-certificates as special package check in smoke-tools.sh
- Add SPECIAL_CHECKS array for packages without matching binaries

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 18:13:59 +08:00

37 lines
856 B
Bash

#!/usr/bin/env bash
set -euo pipefail
TOOLS_FILE="${1:-/opt/claude-dev/required-tools.txt}"
if [[ ! -f "$TOOLS_FILE" ]]; then
echo "required tools file not found: $TOOLS_FILE" >&2
exit 1
fi
# Special packages that aren't standalone binaries
declare -A SPECIAL_CHECKS=(
["ca-certificates"]="test -f /etc/ssl/certs/ca-certificates.crt"
)
missing=()
while IFS= read -r tool; do
[[ -z "$tool" ]] && continue
[[ "$tool" =~ ^# ]] && continue
if [[ -n "${SPECIAL_CHECKS[$tool]:-}" ]]; then
if ! eval "${SPECIAL_CHECKS[$tool]}" >/dev/null 2>&1; then
missing+=("$tool")
fi
elif ! command -v "$tool" >/dev/null 2>&1; then
missing+=("$tool")
fi
done < "$TOOLS_FILE"
if (( ${#missing[@]} > 0 )); then
echo "Missing required tools:" >&2
printf ' - %s\n' "${missing[@]}" >&2
exit 1
fi
echo "All required tools are present"