fix: JSON_UNESCAPED_UNICODE

This commit is contained in:
Andras Bacsai 2024-05-23 11:58:54 +02:00
parent d9d0837024
commit df9ec711c5
2 changed files with 4 additions and 5 deletions

View File

@ -60,7 +60,7 @@ public static function decodeOutput(?Activity $activity = null): string
$decoded = json_decode(
data_get($activity, 'description'),
associative: true,
flags: JSON_THROW_ON_ERROR
flags: JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE
);
} catch (\JsonException $exception) {
return '';
@ -164,7 +164,7 @@ protected function elapsedTime(): int
public function encodeOutput($type, $output)
{
$outputStack = json_decode($this->activity->description, associative: true, flags: JSON_THROW_ON_ERROR);
$outputStack = json_decode($this->activity->description, associative: true, flags: JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
$outputStack[] = [
'type' => $type,
@ -174,12 +174,12 @@ public function encodeOutput($type, $output)
'order' => $this->getLatestCounter(),
];
return json_encode($outputStack, flags: JSON_THROW_ON_ERROR);
return json_encode($outputStack, flags: JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
}
protected function getLatestCounter(): int
{
$description = json_decode($this->activity->description, associative: true, flags: JSON_THROW_ON_ERROR);
$description = json_decode($this->activity->description, associative: true, flags: JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
if ($description === null || count($description) === 0) {
return 1;
}

View File

@ -57,7 +57,6 @@ public function handle()
}
private function check_docker_engine()
{
ray('Checking Docker Engine');
$version = instant_remote_process([
"docker info",
], $this->server, false);