From 5f708478106f1f38b04f932e00f892240b9bcb04 Mon Sep 17 00:00:00 2001 From: AriaieBOY Date: Fri, 12 Aug 2022 00:18:04 +0430 Subject: [PATCH] Update laravel-sail.plugin.zsh --- laravel-sail.plugin.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/laravel-sail.plugin.zsh b/laravel-sail.plugin.zsh index 8070641..c47108f 100644 --- a/laravel-sail.plugin.zsh +++ b/laravel-sail.plugin.zsh @@ -1,3 +1,4 @@ +export APP_SERVICE=${APP_SERVICE:-"laravel.test"} function s() { if [[ $1 == "cinit" ]]; then docker run --rm \ @@ -14,7 +15,7 @@ function s() { node:${2:=17} \ npm install else - bash ./vendor/bin/sail $* + [ -f sail ] && sh sail $* || sh vendor/bin/sail $* fi } # alias s='bash ./vendor/bin/sail' @@ -29,7 +30,7 @@ alias sasr='s artisan schedule:run' alias sp='s php' alias sc='s composer' alias sn='s npm' -alias spn='s pnpm' +alias spn='s exec -u sail $APP_SERVICE pnpm' alias sy='s yarn' alias swatch='s npm run watch' alias sprod='s npm run production'