Ver a proveniência

make debugging credentials issues a bit easier

tags/v1.4.21
Jonathan Cobb há 4 anos
ascendente
cometimento
a7f4699b6e
2 ficheiros alterados com 13 adições e 5 eliminações
  1. +12
    -4
      bin/bubble_common
  2. +1
    -1
      utils/cobbzilla-wizard

+ 12
- 4
bin/bubble_common Ver ficheiro

@@ -78,12 +78,20 @@ elif [[ ! -f "${BUBBLE_SCRIPTS}/run.sh" ]] ; then
fi

# If BUBBLE_API is defined, we may have cached credentials
if [[ ! -z "${BUBBLE_API}" ]] ; then
BUBBLE_AUTH="${HOME}/.bubble_auth"
if [[ ! -z "${BUBBLE_API}" && -d "${BUBBLE_AUTH}" ]] ; then
if [[ -z "${BUBBLE_DISABLE_AUTH_CACHE}" || "${BUBBLE_DISABLE_AUTH_CACHE}" == "false" ]] ; then
API_HOST="$(echo -n "${BUBBLE_API}" | awk -F '/' '{print $3}')"
USER_FILE="${HOME}/.bubble_auth/${API_HOST}/user"
PASS_FILE="${HOME}/.bubble_auth/${API_HOST}/pass"
if [[ -f ${USER_FILE} && -f ${PASS_FILE} ]] ; then
AUTH_DIR="${BUBBLE_AUTH}/${API_HOST}"
USER_FILE="${AUTH_DIR}/user"
PASS_FILE="${AUTH_DIR}/pass"

if [[ ! -z "${BUBBLE_USER}" && -f ${PASS_FILE} ]] ; then
echo "Using cached password from ${AUTH_DIR} (set env var BUBBLE_DISABLE_AUTH_CACHE=true to disable this behavior)"
BUBBLE_PASS="$(cat "${PASS_FILE}" | tr -d '[:space:]')"

elif [[ -f ${USER_FILE} && -f ${PASS_FILE} ]] ; then
echo "Using cached user/pass from ${AUTH_DIR} (set env var BUBBLE_DISABLE_AUTH_CACHE=true to disable this behavior)"
BUBBLE_USER="$(cat "${USER_FILE}" | tr -d '[:space:]')"
BUBBLE_PASS="$(cat "${PASS_FILE}" | tr -d '[:space:]')"
fi


+ 1
- 1
utils/cobbzilla-wizard

@@ -1 +1 @@
Subproject commit a7e73f4cfb35ae250e59a2b01abf132bf577f899
Subproject commit a320fdad5d4d29fdecc080c1053f9e1be7284d73

Carregando…
Cancelar
Guardar