From 966f8dde5187968e7956d92a4e655588f72afe50 Mon Sep 17 00:00:00 2001 From: Stephan Huber Date: Tue, 4 Aug 2020 21:16:28 +0200 Subject: [PATCH] Fix a warning when running scaffold without scripts --- src/Scaffolder/Scaffolder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Scaffolder/Scaffolder.php b/src/Scaffolder/Scaffolder.php index aadc166b..265084f0 100644 --- a/src/Scaffolder/Scaffolder.php +++ b/src/Scaffolder/Scaffolder.php @@ -233,7 +233,7 @@ public function scaffold( $script->runScript($host_config, $context); /** @var CommandResult $result */ - $result = $context->getResult('commandResult'); + $result = $context->getResult('commandResult', new CommandResult(0, [])); if ($result && $result->failed()) { throw new RuntimeException(sprintf( "Scaffolding failed with exit-code %d\n%s",