From c636dd712fe5a183afd597a1f5aebcb6148d417e Mon Sep 17 00:00:00 2001 From: Amanjeet Singh Date: Thu, 26 Sep 2024 17:55:16 +0530 Subject: [PATCH] fix: install debug reporter in maestro cloud command (#2069) fix: install debug reporter in maestro cloud --- .../main/java/maestro/cli/command/CloudCommand.kt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/maestro-cli/src/main/java/maestro/cli/command/CloudCommand.kt b/maestro-cli/src/main/java/maestro/cli/command/CloudCommand.kt index 3e78e3527e..62460c0ac0 100644 --- a/maestro-cli/src/main/java/maestro/cli/command/CloudCommand.kt +++ b/maestro-cli/src/main/java/maestro/cli/command/CloudCommand.kt @@ -19,12 +19,14 @@ package maestro.cli.command +import maestro.cli.App import maestro.cli.CliError import maestro.cli.DisableAnsiMixin import maestro.cli.ShowHelpMixin import maestro.cli.api.ApiClient import maestro.cli.cloud.CloudInteractor import maestro.cli.report.ReportFormat +import maestro.cli.report.TestDebugReporter import maestro.cli.util.PrintUtils import maestro.orchestra.util.Env.withInjectedShellEnvVars import maestro.orchestra.workspace.WorkspaceExecutionPlanner @@ -34,6 +36,7 @@ import java.io.File import java.util.concurrent.Callable import java.util.concurrent.TimeUnit import maestro.orchestra.util.Env.withDefaultEnvVars +import kotlin.io.path.absolutePathString @CommandLine.Command( name = "cloud", @@ -162,8 +165,16 @@ class CloudCommand : Callable { @Option(hidden = true, names = ["--timeout"], description = ["Minutes to wait until all flows complete"]) private var resultWaitTimeout = 60 - override fun call(): Int { + @CommandLine.ParentCommand + private val parent: App? = null + override fun call(): Int { + TestDebugReporter.install( + debugOutputPathAsString = null, + flattenDebugOutput = false, + printToConsole = parent?.verbose == true, + ) + validateFiles() validateWorkSpace()