Skip to content

Commit 4724fbf

Browse files
committed
fix: didn't convert invocation to an array properly
1 parent 523f1f2 commit 4724fbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Command/AbstractInvocationCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ protected function invokeEnvironmentFunction(string $environment, array $payload
3535
$invocation = $this->wait(function () use ($invocationId) {
3636
$invocation = $this->apiClient->getInvocation($invocationId);
3737

38-
return !in_array($invocation->get('status'), ['pending', 'running']) ? $invocation : [];
38+
return !in_array($invocation->get('status'), ['pending', 'running']) ? $invocation->all() : [];
3939
}, $timeout);
4040

41-
if ('failed' === $invocation->get('status')) {
41+
if (empty($invocation['status']) || 'failed' === $invocation['status']) {
4242
throw new RuntimeException('Running the command failed');
4343
} elseif (!Arr::has($invocation, ['result.exitCode', 'result.output'])) {
4444
throw new RuntimeException('Unable to get the result of the command from the Ymir API');

0 commit comments

Comments
 (0)