fix(traits): update saved_outputs handling in ExecuteRemoteCommand to use collection methods for better performance
This commit is contained in:
parent
8f78c54cd3
commit
2eef83f072
1 changed files with 4 additions and 4 deletions
|
|
@ -202,13 +202,13 @@ private function executeCommandWithProcess($command, $hidden, $customType, $appe
|
||||||
|
|
||||||
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue