mirror of
https://github.com/coollabsio/coolify.git
synced 2025-12-28 05:34:50 +00:00
fix(traits): update saved_outputs handling in ExecuteRemoteCommand to use collection methods for better performance
This commit is contained in:
parent
8f78c54cd3
commit
2eef83f072
@ -202,13 +202,13 @@ trait ExecuteRemoteCommand
|
||||
|
||||
if ($this->save) {
|
||||
if (data_get($this->saved_outputs, $this->save, null) === null) {
|
||||
data_set($this->saved_outputs, $this->save, str());
|
||||
$this->saved_outputs->put($this->save, str());
|
||||
}
|
||||
if ($append) {
|
||||
$this->saved_outputs[$this->save] .= str($sanitized_output)->trim();
|
||||
$this->saved_outputs[$this->save] = str($this->saved_outputs[$this->save]);
|
||||
$current_value = $this->saved_outputs->get($this->save);
|
||||
$this->saved_outputs->put($this->save, str($current_value.str($sanitized_output)->trim()));
|
||||
} else {
|
||||
$this->saved_outputs[$this->save] = str($sanitized_output)->trim();
|
||||
$this->saved_outputs->put($this->save, str($sanitized_output)->trim());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user