Skip to content

Commit d1704d9

Browse files
committed
Fix not overriding default resources/css/app.css files when empty
1 parent 647cd37 commit d1704d9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Commands/InstallCommand.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ private function ensureTailwindConfigExists()
4444
to: base_path('tailwind.config.js'),
4545
);
4646

47-
$this->copyStubToAppIfMissing(
48-
stub: __DIR__ . '/../../stubs/resources/css/app.css',
49-
to: resource_path('css/app.css'),
50-
);
47+
if (! File::exists($appCssFilePath = resource_path('css/app.css')) || empty(trim(File::get($appCssFilePath)))) {
48+
$this->copyStubToApp(
49+
stub: __DIR__ . '/../../stubs/resources/css/app.css',
50+
to: $appCssFilePath,
51+
);
52+
}
5153

5254
return self::SUCCESS;
5355
});

0 commit comments

Comments
 (0)