Skip to content

Commit

Permalink
IMP: open for multiple urls
Browse files Browse the repository at this point in the history
  • Loading branch information
GrimLink committed Feb 7, 2022
1 parent 043d7a9 commit 13264c8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions mage
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,23 @@ case "${@}" in
if [[ -n "$MAGERUN_CLI" ]]; then
if [[ "$STORE" == "admin" ]]; then
STORE_URL=$($MAGERUN_CLI sys:store:config:base-url:list --format csv | grep default | cut -d ',' -f3)
URL="${STORE_URL}${ADMIN_PATH}"
URL=${STORE_URL}${ADMIN_PATH}
else
STORE_URL=$($MAGERUN_CLI sys:store:config:base-url:list --format csv | grep $STORE | cut -d ',' -f3)
URL="${STORE_URL}"
URL=${STORE_URL}
fi
elif [[ "$STORE" == "admin" ]]; then
URL="$($MAGENTO_CLI config:show web/${HTTP}/base_url)${ADMIN_PATH}"
URL=$($MAGENTO_CLI config:show web/${HTTP}/base_url)${ADMIN_PATH}
else
URL="$($MAGENTO_CLI config:show web/${HTTP}/base_url)"
URL=$($MAGENTO_CLI config:show web/${HTTP}/base_url)
fi

if [[ -z "$URL" ]]; then
echo "Could not find url for store $STORE"
else
echo "Opening url $URL" && $OPEN_CLI $URL
echo "Opening.."
echo $URL
$OPEN_CLI $URL
fi
;;

Expand Down

0 comments on commit 13264c8

Please sign in to comment.