Skip to content

Commit

Permalink
FIX: cmd's with params
Browse files Browse the repository at this point in the history
  • Loading branch information
GrimLink committed Feb 10, 2022
1 parent 7a18403 commit bab69e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.8.1] - 2022-02-10
### Fixes
- Mage open with single quotes in admin url
- Mage run, admin and theme with params

## [1.8.0] - 2022-02-07
### Added
- Hyva setup options
Expand Down
18 changes: 9 additions & 9 deletions mage
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RED='\033[0;31m'
GREEN='\033[1;32m'
BLUE='\033[1;34m'

VERSION="1.8.0"
VERSION="1.8.1"
GITNAME="$(git config --global --get user.name | head -n1 | cut -d " " -f1)"
GITEMAIL="$(git config --global --get user.email)"
ADMINNAME="admin_$(echo "$GITNAME" | tr '[:upper:]' '[:lower:]')"
Expand Down Expand Up @@ -141,7 +141,7 @@ case "${@}" in

# Prefetch admin URL data for open steps
if [[ "$STORE" == "admin" ]]; then
ADMIN_PATH=$(grep frontName app/etc/env.php | tail -1 | cut -d '>' -f2 | cut -d '"' -f2)
ADMIN_PATH=$(grep frontName app/etc/env.php | tail -1 | cut -d '>' -f2 | cut -d '"' -f2 | cut -d "'" -f2)
fi

# If Magerun does not exist, then make sure if the path is secure or not
Expand Down Expand Up @@ -227,8 +227,8 @@ case "${@}" in

;;

"new admin")
if [[ "$2" == "--yes" ]] || [[ "$2" == "-y" ]]; then
"new admin"*)
if [[ "$3" == "--yes" ]] || [[ "$3" == "-y" ]]; then
SKIP="true"
fi

Expand Down Expand Up @@ -259,15 +259,15 @@ case "${@}" in
fi
;;

"new theme")
newMagentoMod "theme"
"new theme"*)
newMagentoMod "theme" "$3"
;;

"new module")
newMagentoMod "module"
;;

"new "*)
"new"*)
echo ""
echo -e "${RED}No ${BOLD}new${RESET}${RED} option given!${RESET}"
helpMessage
Expand Down Expand Up @@ -330,7 +330,7 @@ case "${@}" in
echo "For more see the docs -> https://docs.hyva.io/hyva-themes/getting-started/"
;;

"add "*)
"add"*)
echo ""
echo -e "${RED}No ${BOLD}add${RESET}${RED} option given!${RESET}"
helpMessage
Expand All @@ -354,7 +354,7 @@ case "${@}" in
composer require $OPTION
;;

"run")
"run"*)
if [[ -n "$MAGERUN_CLI" ]]; then
$MAGERUN_CLI ${@:2}
else
Expand Down

0 comments on commit bab69e3

Please sign in to comment.