Skip to content

Commit 087d166

Browse files
authored
Adds sail pint (laravel#439)
1 parent b69e7bc commit 087d166

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

bin/sail

+13
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ function display_help {
8282
echo "${YELLOW}Running Tests:${NC}"
8383
echo " ${GREEN}sail test${NC} Run the PHPUnit tests via the Artisan test command"
8484
echo " ${GREEN}sail phpunit ...${NC} Run PHPUnit"
85+
echo " ${GREEN}sail pint ...${NC} Run Pint"
8586
echo " ${GREEN}sail dusk${NC} Run the Dusk tests (Requires the laravel/dusk package)"
8687
echo " ${GREEN}sail dusk:fails${NC} Re-run previously failed Dusk tests (Requires the laravel/dusk package)"
8788
echo
@@ -284,6 +285,18 @@ elif [ "$1" == "phpunit" ]; then
284285
sail_is_not_running
285286
fi
286287

288+
# Proxy the "pint" command to "php vendor/bin/pint"...
289+
elif [ "$1" == "pint" ]; then
290+
shift 1
291+
292+
if [ "$EXEC" == "yes" ]; then
293+
ARGS+=(exec -u sail)
294+
[ ! -t 0 ] && ARGS+=(-T)
295+
ARGS+=("$APP_SERVICE" php vendor/bin/pint "$@")
296+
else
297+
sail_is_not_running
298+
fi
299+
287300
# Proxy the "dusk" command to the "php artisan dusk" Artisan command...
288301
elif [ "$1" == "dusk" ]; then
289302
shift 1

0 commit comments

Comments
 (0)