Skip to content

Commit 1c49364

Browse files
committed
wip
1 parent 0054780 commit 1c49364

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/Generator.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,11 @@ protected function makeContentGenerationClosures($pages, $request)
284284

285285
$request->setPage($page);
286286

287-
$this->writeGeneratingLine($page->url());
287+
// Only write the "Generating" line when using a single worker.
288+
// Otherwise, the output will be messed up.
289+
if ($this->workers === 1) {
290+
$this->writeGeneratingLine($page->url());
291+
}
288292

289293
try {
290294
$generated = $page->generate($request);
@@ -293,7 +297,10 @@ protected function makeContentGenerationClosures($pages, $request)
293297
return $e->consoleMessage();
294298
}
295299

296-
$this->clearCurrentLine();
300+
if ($this->workers === 1) {
301+
$this->clearCurrentLine();
302+
}
303+
297304
Partyline::outputComponents()->twoColumnDetail($page->url(), '<fg=red;options=bold>FAILED</>');
298305

299306
$errors[] = $e->consoleMessage();
@@ -311,7 +318,10 @@ protected function makeContentGenerationClosures($pages, $request)
311318
$warnings[] = $generated->consoleMessage();
312319
}
313320

314-
$this->clearCurrentLine();
321+
if ($this->workers === 1) {
322+
$this->clearCurrentLine();
323+
}
324+
315325
Partyline::outputComponents()->twoColumnDetail($page->url(), '<fg=green;options=bold>SUCCESS</>');
316326

317327
Blink::flush();

0 commit comments

Comments
 (0)