diff --git a/end-to-end/utils_test.go b/end-to-end/utils_test.go index e21f825b8..b3a870ca2 100644 --- a/end-to-end/utils_test.go +++ b/end-to-end/utils_test.go @@ -1,6 +1,7 @@ package endtoend_test import ( + "bytes" "context" "errors" "fmt" @@ -75,6 +76,10 @@ func startAgent(t *testing.T, ctx context.Context) (cleanup func()) { //nolint:gosec // The executable is located at the Appx directory cmd := exec.CommandContext(ctx, ubuntupro) + var buff bytes.Buffer + cmd.Stdout = &buff + cmd.Stderr = &buff + err = cmd.Start() require.NoError(t, err, "Setup: could not start agent") @@ -100,6 +105,7 @@ func startAgent(t *testing.T, ctx context.Context) (cleanup func()) { //nolint:errcheck // This returns a "context cancelled" error. cmd.Wait() + t.Logf("Agent stopped. Stdout+stderr: %s", buff.String()) } defer func() { diff --git a/gui/packages/ubuntupro/lib/launch_agent.dart b/gui/packages/ubuntupro/lib/launch_agent.dart index d33097a6c..aa39197f5 100644 --- a/gui/packages/ubuntupro/lib/launch_agent.dart +++ b/gui/packages/ubuntupro/lib/launch_agent.dart @@ -17,8 +17,9 @@ Future launchAgent(String agentRelativePath) async { try { await Process.start( agentPath, - [], + ['-vv'], environment: Environment.instance.merged, + mode: ProcessStartMode.inheritStdio, ); return true; } on ProcessException catch (err) {