Skip to content

Commit c5e520a

Browse files
committed
Tweaks the build and install commands to conditionally set the TTY only if available
1 parent b1a7dbb commit c5e520a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Commands/BuildCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function handle()
4848
}
4949

5050
Process::forever()
51-
->tty(true)
51+
->tty(PHP_OS != 'WINNT' && is_writable('/dev/tty'))
5252
->path(base_path())
5353
->run(array_filter([
5454
$binFile,

src/Commands/InstallCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ public function handle()
3838
private function ensureTailwindConfigExists()
3939
{
4040
$this->copyStubToApp(
41-
stub: __DIR__ . '/../../stubs/tailwind.config.js',
41+
stub: __DIR__.'/../../stubs/tailwind.config.js',
4242
to: base_path('tailwind.config.js'),
4343
);
4444

4545
if (! File::exists($appCssFilePath = resource_path('css/app.css')) || empty(trim(File::get($appCssFilePath)))) {
4646
$this->copyStubToApp(
47-
stub: __DIR__ . '/../../stubs/resources/css/app.css',
47+
stub: __DIR__.'/../../stubs/resources/css/app.css',
4848
to: $appCssFilePath,
4949
);
5050
}
@@ -53,7 +53,7 @@ private function ensureTailwindConfigExists()
5353
private function ensureTailwindCliBinaryExists()
5454
{
5555
if (! File::exists(config('tailwindcss.bin_path')) || $this->option('download')) {
56-
Process::forever()->run([
56+
Process::forever()->tty(PHP_OS != 'WINNT' && is_writable('/dev/tty'))->run([
5757
$this->phpBinary(),
5858
'artisan',
5959
'tailwindcss:download',
@@ -168,7 +168,7 @@ private function addIngoreLines()
168168

169169
private function runFirstBuild()
170170
{
171-
Process::forever()->run([
171+
Process::forever()->tty(PHP_OS != 'WINNT' && is_writable('/dev/tty'))->run([
172172
$this->phpBinary(),
173173
'artisan',
174174
'tailwindcss:build',

0 commit comments

Comments
 (0)