From 729e8cdf081ed15d840555b40995fe676182c3fa Mon Sep 17 00:00:00 2001
From: Emanuele Libralato <e.libralato@gmail.com>
Date: Tue, 3 Sep 2019 16:43:04 +0200
Subject: [PATCH] fix: running task would print undefined

---
 garden-service/src/commands/run/task.ts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/garden-service/src/commands/run/task.ts b/garden-service/src/commands/run/task.ts
index 4e9cbe74cf..a1c81a46a9 100644
--- a/garden-service/src/commands/run/task.ts
+++ b/garden-service/src/commands/run/task.ts
@@ -64,7 +64,9 @@ export class RunTaskCommand extends Command<Args, Opts> {
 
     if (!result.error) {
       log.info("")
-      log.info(chalk.white(result.output.output))
+      // TODO: The command will need to be updated to stream logs: see https://github.com/garden-io/garden/issues/630.
+      // It's ok with the current providers but the shape might change in the future.
+      log.info(chalk.white(result.output.outputs.log))
       printFooter(footerLog)
     }