diff --git a/src/Artifact/Actions/Base/ScriptAction.php b/src/Artifact/Actions/Base/ScriptAction.php index 2aad2495..a176c659 100644 --- a/src/Artifact/Actions/Base/ScriptAction.php +++ b/src/Artifact/Actions/Base/ScriptAction.php @@ -71,7 +71,7 @@ protected function runImplementation( $script->runScript($host_config, $cloned_context); /** @var CommandResult $cr */ - if ($cr = $context->getResult('commandResult')) { + if ($cr = $cloned_context->getResult('commandResult')) { if ($cr->failed()) { $cr->throwException('Script action failed with an error!'); }