fix(healthchecks): remove redundant newline sanitization from CMD healthcheck

Simplify the CMD healthcheck generation by removing the str_replace call that
normalizes newlines. The command is now used directly without modification,
following the pattern of centralized command escaping in recent changes.
This commit is contained in:
Andras Bacsai 2026-02-25 12:08:24 +01:00
parent 521d995ea1
commit 3e755338b4

View file

@ -2771,10 +2771,9 @@ private function generate_healthcheck_commands()
{
// Handle CMD type healthcheck
if ($this->application->health_check_type === 'cmd' && ! empty($this->application->health_check_command)) {
$command = str_replace(["\r\n", "\r", "\n"], ' ', $this->application->health_check_command);
$this->full_healthcheck_url = $command;
$this->full_healthcheck_url = $this->application->health_check_command;
return $command;
return $this->application->health_check_command;
}
// HTTP type healthcheck (default)