From 12af123d9b1544a65c3e41ec769047d6fb53521f Mon Sep 17 00:00:00 2001 From: Guillermo Cava Date: Sat, 5 Apr 2025 23:38:42 -0500 Subject: [PATCH] adds the no-tty flag There is an odd behavior with tty and certain envs (such as MacOS), by passing this flag it enables tailwind v4 to work as expected. --- src/Commands/BuildCommand.php | 6 +++++- src/Commands/WatchCommand.php | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Commands/BuildCommand.php b/src/Commands/BuildCommand.php index 145fa32..f67f61d 100644 --- a/src/Commands/BuildCommand.php +++ b/src/Commands/BuildCommand.php @@ -16,6 +16,7 @@ class BuildCommand extends Command {--minify : If you want the final CSS file to be minified.} {--digest : If you want the final CSS file to be generated using a digest of its contents (does not work with the --watch flag).} {--prod : This option combines the --minify and --digest options. Ideal for production.} + {--no-tty : Disables TTY output mode. Use this in environments where TTY is not supported or causing issues.} '; protected $description = 'Generates a new build of Tailwind CSS for your project.'; @@ -49,7 +50,10 @@ public function handle(): int } Process::forever() - ->tty(SymfonyProcess::isTtySupported()) + ->when( + ! $this->option('no-tty'), + fn ($process) => $process->tty(SymfonyProcess::isTtySupported()) + ) ->path(base_path()) ->run(array_filter([ $binFile, diff --git a/src/Commands/WatchCommand.php b/src/Commands/WatchCommand.php index 042d3b9..836625d 100644 --- a/src/Commands/WatchCommand.php +++ b/src/Commands/WatchCommand.php @@ -6,7 +6,9 @@ class WatchCommand extends Command { - protected $signature = 'tailwindcss:watch'; + protected $signature = 'tailwindcss:watch + {--no-tty : Disables TTY output mode. Use this in environments where TTY is not supported or causing issues.} + '; protected $description = 'Generates a new build of Tailwind CSS for your project, and keeps watching your files changes.'; @@ -14,6 +16,7 @@ public function handle() { return $this->call('tailwindcss:build', [ '--watch' => true, + '--no-tty' => $this->option('no-tty'), ]); } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy