Преглед изворни кода

fix(cli): Further reformat error logging due to eligibility

HouseinIsProgramming пре 7 месеци
родитељ
комит
77c962ced9
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      packages/cli/src/commands/add/add.ts

+ 3 - 3
packages/cli/src/commands/add/add.ts

@@ -46,10 +46,10 @@ async function handleNonInteractiveMode(options: AddOperationOptions) {
             const stackLines = e.stack.split('\n');
             const stackTrace = stackLines.slice(1).join('\n'); // Remove first line (error message)
 
-            // Display colored error message, newline, then stack trace
-            log.error(pc.red('Error:') + ' ' + String(errorMessage));
-            log.error(''); // Add empty line for better readability
+            // Display stack trace first, then colored error message at the end
             log.error(stackTrace);
+            log.error(''); // Add empty line for better readability
+            log.error(pc.red('Error:') + ' ' + String(errorMessage));
         } else {
             log.error(e.message as string);
             if (e.stack) {