From 23eb1a0da68c7c8ae2f6e3accbe02a2ca50b2ae0 Mon Sep 17 00:00:00 2001 From: Lucas Yang Date: Thu, 15 Aug 2024 22:41:45 +0800 Subject: [PATCH] Remove `docker-compose.yml` in .editorconfig --- src/Console/Concerns/HasInitializeLaravelApp.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Console/Concerns/HasInitializeLaravelApp.php b/src/Console/Concerns/HasInitializeLaravelApp.php index a0846de..ea622c2 100644 --- a/src/Console/Concerns/HasInitializeLaravelApp.php +++ b/src/Console/Concerns/HasInitializeLaravelApp.php @@ -27,6 +27,14 @@ protected function updateEditorConfig(): void ); } + if (str_contains($editorConfig, '[docker-compose.yml]')) { + $editorConfig = str_replace( + "\n[docker-compose.yml]\nindent_size = 4\n", + '', + $editorConfig + ); + } + file_put_contents(base_path('.editorconfig'), $editorConfig); $this->components->info('Updated .editorconfig');