Skip to content

Commit 01dbe6e

Browse files
author
serverpod_cloud
committed
fix: 0adbf90c641ad4896267f903d1c1070c095247ac
1 parent 142d66b commit 01dbe6e

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

serverpod_cloud_cli/bin/serverpod_cloud_cli.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ void main(final List<String> args) async {
2323
logger.error(
2424
_formatInternalError(error),
2525
stackTrace: stackTrace,
26+
forcePrintStackTrace: true,
2627
);
2728
await _preExit(logger);
2829
exit(ExitException.codeError);
@@ -32,6 +33,7 @@ void main(final List<String> args) async {
3233
logger.error(
3334
_formatInternalError(error, zonedError: true),
3435
stackTrace: stackTrace,
36+
forcePrintStackTrace: true,
3537
);
3638
await _preExit(logger);
3739
exit(ExitException.codeError);

serverpod_cloud_cli/lib/command_logger/command_logger.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ class CommandLogger {
161161
final String? hint,
162162
final bool newParagraph = false,
163163
final StackTrace? stackTrace,
164+
final bool forcePrintStackTrace = false,
164165
}) {
165166
final String msg;
166167
if (exception != null) {
@@ -175,7 +176,9 @@ class CommandLogger {
175176
_logger.error(
176177
msg,
177178
newParagraph: newParagraph,
178-
stackTrace: configuration?.verbose == true ? stackTrace : null,
179+
stackTrace: configuration?.verbose == true || forcePrintStackTrace
180+
? stackTrace
181+
: null,
179182
);
180183

181184
if (hint != null) {

serverpod_cloud_cli/test_utils/test_command_logger.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ class TestCommandLogger extends CommandLogger {
300300
final String? hint,
301301
final bool newParagraph = false,
302302
final StackTrace? stackTrace,
303+
final bool forcePrintStackTrace = false,
303304
}) {
304305
if (printToStdout) {
305306
print('log error: $message');

0 commit comments

Comments
 (0)