Fix styling
This commit is contained in:
committed by
github-actions[bot]
parent
41fb6a1fc9
commit
d86274cc37
@@ -12,7 +12,9 @@ use Illuminate\Support\Str;
|
||||
trait ExecuteRemoteCommand
|
||||
{
|
||||
public ?string $save = null;
|
||||
|
||||
public static int $batch_counter = 0;
|
||||
|
||||
public function execute_remote_command(...$commands)
|
||||
{
|
||||
static::$batch_counter++;
|
||||
@@ -45,7 +47,7 @@ trait ExecuteRemoteCommand
|
||||
$process = Process::timeout(3600)->idleTimeout(3600)->start($remote_command, function (string $type, string $output) use ($command, $hidden, $customType, $append) {
|
||||
$output = Str::of($output)->trim();
|
||||
if ($output->startsWith('╔')) {
|
||||
$output = "\n" . $output;
|
||||
$output = "\n".$output;
|
||||
}
|
||||
$new_log_entry = [
|
||||
'command' => remove_iip($command),
|
||||
@@ -55,7 +57,7 @@ trait ExecuteRemoteCommand
|
||||
'hidden' => $hidden,
|
||||
'batch' => static::$batch_counter,
|
||||
];
|
||||
if (!$this->application_deployment_queue->logs) {
|
||||
if (! $this->application_deployment_queue->logs) {
|
||||
$new_log_entry['order'] = 1;
|
||||
} else {
|
||||
$previous_logs = json_decode($this->application_deployment_queue->logs, associative: true, flags: JSON_THROW_ON_ERROR);
|
||||
@@ -83,7 +85,7 @@ trait ExecuteRemoteCommand
|
||||
|
||||
$process_result = $process->wait();
|
||||
if ($process_result->exitCode() !== 0) {
|
||||
if (!$ignore_errors) {
|
||||
if (! $ignore_errors) {
|
||||
$this->application_deployment_queue->status = ApplicationDeploymentStatus::FAILED->value;
|
||||
$this->application_deployment_queue->save();
|
||||
throw new \RuntimeException($process_result->errorOutput());
|
||||
|
||||
Reference in New Issue
Block a user