From bab69e3fcd3660c73d8a902ec12bee8c550a1d67 Mon Sep 17 00:00:00 2001 From: grimlink Date: Thu, 10 Feb 2022 21:14:47 +0100 Subject: [PATCH] FIX: cmd's with params --- CHANELOG.md | 5 +++++ mage | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CHANELOG.md b/CHANELOG.md index b5a57ea..b28d5c9 100644 --- a/CHANELOG.md +++ b/CHANELOG.md @@ -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 diff --git a/mage b/mage index 8f226d0..99db53b 100755 --- a/mage +++ b/mage @@ -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:]')" @@ -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 @@ -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 @@ -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 @@ -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 @@ -354,7 +354,7 @@ case "${@}" in composer require $OPTION ;; -"run") +"run"*) if [[ -n "$MAGERUN_CLI" ]]; then $MAGERUN_CLI ${@:2} else