mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-16 08:15:00 +00:00
fix(traits): update saved_outputs handling in ExecuteRemoteCommand to use collection methods for better performance
This commit is contained in:
1 parent
8f78c54cd3
commit
2eef83f072
1 file changed
+4
-4
@@ -202,13 +202,13 @@ trait ExecuteRemoteCommand
|
|||||||
|
|
||||||
if ($this->save) {
|
if ($this->save) {
|
||||||
if (data_get($this->saved_outputs, $this->save, null) === null) {
|
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) {
|
if ($append) {
|
||||||
$this->saved_outputs[$this->save] .= str($sanitized_output)->trim();
|
$current_value = $this->saved_outputs->get($this->save);
|
||||||
$this->saved_outputs[$this->save] = str($this->saved_outputs[$this->save]);
|
$this->saved_outputs->put($this->save, str($current_value.str($sanitized_output)->trim()));
|
||||||
} else {
|
} else {
|
||||||
$this->saved_outputs[$this->save] = str($sanitized_output)->trim();
|
$this->saved_outputs->put($this->save, str($sanitized_output)->trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user