Skip to content

Commit 2abf2b4

Browse files
authored
Merge pull request #45 from gcavanunez/gc/adds-no-tty-flag
Adds the `no-tty` flag
2 parents 6438ea7 + 12af123 commit 2abf2b4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/Commands/BuildCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class BuildCommand extends Command
1616
{--minify : If you want the final CSS file to be minified.}
1717
{--digest : If you want the final CSS file to be generated using a digest of its contents (does not work with the --watch flag).}
1818
{--prod : This option combines the --minify and --digest options. Ideal for production.}
19+
{--no-tty : Disables TTY output mode. Use this in environments where TTY is not supported or causing issues.}
1920
';
2021

2122
protected $description = 'Generates a new build of Tailwind CSS for your project.';
@@ -49,7 +50,10 @@ public function handle(): int
4950
}
5051

5152
Process::forever()
52-
->tty(SymfonyProcess::isTtySupported())
53+
->when(
54+
! $this->option('no-tty'),
55+
fn ($process) => $process->tty(SymfonyProcess::isTtySupported())
56+
)
5357
->path(base_path())
5458
->run(array_filter([
5559
$binFile,

src/Commands/WatchCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66

77
class WatchCommand extends Command
88
{
9-
protected $signature = 'tailwindcss:watch';
9+
protected $signature = 'tailwindcss:watch
10+
{--no-tty : Disables TTY output mode. Use this in environments where TTY is not supported or causing issues.}
11+
';
1012

1113
protected $description = 'Generates a new build of Tailwind CSS for your project, and keeps watching your files changes.';
1214

1315
public function handle()
1416
{
1517
return $this->call('tailwindcss:build', [
1618
'--watch' => true,
19+
'--no-tty' => $this->option('no-tty'),
1720
]);
1821
}
1922
}

0 commit comments

Comments
 (0)
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