PanelChange::promote($dir, $opts, $apply)); // Journal is field-scoped and contains no passwords/UUIDs/tokens. echo json_encode($result, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE) . PHP_EOL; } catch (Throwable $e) { $reason=get_class($e)===RuntimeException::class ? $e->getMessage() : "Inspect protected journal/current state"; fwrite(STDERR, "Promotion stopped: " . $reason . "\n"); exit(1); }