File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -381,20 +381,17 @@ private function overwrite(string $message): void
381
381
$ lines = floor (Helper::strlen ($ message ) / $ this ->terminal ->getWidth ()) + $ this ->formatLineCount + 1 ;
382
382
$ this ->output ->clear ($ lines );
383
383
} else {
384
- // Move the cursor to the beginning of the line
385
- $ this ->output ->write ("\x0D" );
386
-
387
- // Erase the line
388
- $ this ->output ->write ("\x1B[2K " );
389
-
390
384
// Erase previous lines
391
385
if ($ this ->formatLineCount > 0 ) {
392
- $ this -> output -> write ( str_repeat ("\x1B[1A \x1B[2K " , $ this ->formatLineCount )) ;
386
+ $ message = str_repeat ("\x1B[1A \x1B[2K " , $ this ->formatLineCount ). $ message ;
393
387
}
388
+
389
+ // Move the cursor to the beginning of the line and erase the line
390
+ $ message = "\x0D\x1B[2K $ message " ;
394
391
}
395
392
}
396
393
} elseif ($ this ->step > 0 ) {
397
- $ this -> output -> writeln ( '' ) ;
394
+ $ message = PHP_EOL . $ message ;
398
395
}
399
396
400
397
$ this ->firstRun = false ;
You can’t perform that action at this time.
0 commit comments