Unverified Commit 40bc6b55 authored by Sigurd Meldgaard's avatar Sigurd Meldgaard Committed by GitHub

Move debug error message from failed pub to logger.printTrace (#118379)

* Move debug error message from failed pub to logger.printTrace

* Update test
parent 27502f68
......@@ -475,10 +475,8 @@ class _DefaultPub implements Pub {
buffer.writeln('command: "${pubCommand.join(' ')}"');
buffer.write(_stringifyPubEnv(pubEnvironment));
buffer.writeln('exit code: $code');
throwToolExit(
buffer.toString(),
exitCode: code,
);
_logger.printTrace(buffer.toString());
throwToolExit(null, exitCode: code);
}
}
......
......@@ -555,9 +555,10 @@ exit code: 66
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
context: PubContext.flutterTests,
),
throwsA(isA<ToolExit>().having((ToolExit error) => error.message, 'message', toolExitMessage)),
throwsA(isA<ToolExit>().having((ToolExit error) => error.message, 'message', null)),
);
expect(logger.statusText, isEmpty);
expect(logger.traceText, contains(toolExitMessage));
expect(
mockStdio.stdout.writes.map(utf8.decode),
<String>[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment