mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-17 04:59:30 +00:00
Remove ANSI colors from console output.
This commit is contained in:
@@ -17,7 +17,7 @@ class GetLogs extends Component
|
|||||||
public int $numberOfLines = 100;
|
public int $numberOfLines = 100;
|
||||||
public function doSomethingWithThisChunkOfOutput($output)
|
public function doSomethingWithThisChunkOfOutput($output)
|
||||||
{
|
{
|
||||||
$this->outputs .= $output;
|
$this->outputs .= removeAnsiColors($output);
|
||||||
}
|
}
|
||||||
public function instantSave()
|
public function instantSave()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -501,3 +501,6 @@ function generateDeployWebhook($resource) {
|
|||||||
$url = $api . $endpoint . "?uuid=$uuid&force=false";
|
$url = $api . $endpoint . "?uuid=$uuid&force=false";
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
function removeAnsiColors($text) {
|
||||||
|
return preg_replace('/\e[[][A-Za-z0-9];?[0-9]*m?/', '', $text);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user