Remove config wrappers.

This commit is contained in:
2025-08-08 09:56:36 -07:00
parent 97e25a5f08
commit 6be0260673
6 changed files with 28 additions and 48 deletions

View File

@@ -62,16 +62,18 @@ SECRETS_FILE="${WC_HOME}/secrets.yaml"
if [ ! -f "${SECRETS_FILE}" ]; then
echo "Error: secrets file not found at ${SECRETS_FILE}" >&2
exit 1
echo ""
exit 0
fi
# Use yq to extract the value from the YAML file
result=$(yq eval ".${KEY_PATH}" "${SECRETS_FILE}" 2>/dev/null)
result=$(yq eval ".${KEY_PATH}" "${SECRETS_FILE}" 2>/dev/null || echo "null")
# Check if result is null (key not found)
if [ "${result}" = "null" ]; then
echo "Error: Key path '${KEY_PATH}' not found in ${SECRETS_FILE}" >&2
exit 1
echo ""
exit 0
fi
echo "${result}"