Explorar o código

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

HouseinIsProgramming hai 7 meses
pai
achega
77c962ced9
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  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) {