Skip to content

Commit

Permalink
find found multiple paths matching the app's domain which was crash…
Browse files Browse the repository at this point in the history
…ing `demyx restore`
  • Loading branch information
demyxco committed Mar 7, 2024
1 parent 9ba3c32 commit 345b44f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion function/global.sh
Expand Up @@ -166,7 +166,14 @@ demyx_app_login() {
demyx_app_path() {
demyx_event
local DEMYX_APP_PATH="${1:-$DEMYX_ARG_2}"
find "$DEMYX_APP" -name "$DEMYX_APP_PATH" -type d
local DEMYX_APP_PATH_FIND=
DEMYX_APP_PATH_FIND="$(find "$DEMYX_APP" -name "$DEMYX_APP_PATH" -type d)"

if [[ "$DEMYX_APP_PATH_FIND" == *"$DEMYX_WP"/"$DEMYX_APP_PATH"* ]]; then
echo "$DEMYX_WP"/"$DEMYX_APP_PATH"
else
echo "$DEMYX_APP_PATH_FIND"
fi
}
#
# Echo out protocol based on DEMYX_APP_SSL or DEMYX_APP_SSL_WILDCARD.
Expand Down

0 comments on commit 345b44f

Please sign in to comment.