Remove config wrappers.
This commit is contained in:
@@ -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}"
|
Reference in New Issue
Block a user