diff --git a/app/Http/Livewire/Project/Shared/GetLogs.php b/app/Http/Livewire/Project/Shared/GetLogs.php index b693793cf..4244bed12 100644 --- a/app/Http/Livewire/Project/Shared/GetLogs.php +++ b/app/Http/Livewire/Project/Shared/GetLogs.php @@ -17,7 +17,7 @@ class GetLogs extends Component public int $numberOfLines = 100; public function doSomethingWithThisChunkOfOutput($output) { - $this->outputs .= $output; + $this->outputs .= removeAnsiColors($output); } public function instantSave() { diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 8e8b2ec3e..013821bd7 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -501,3 +501,6 @@ function generateDeployWebhook($resource) { $url = $api . $endpoint . "?uuid=$uuid&force=false"; return $url; } +function removeAnsiColors($text) { + return preg_replace('/\e[[][A-Za-z0-9];?[0-9]*m?/', '', $text); +}