From 92823d5bc27a681367dcb77545cb33f237770953 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 29 May 2021 16:19:52 -0400 Subject: [PATCH] Create directories before executing Pandoc --- RoboFile.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/RoboFile.php b/RoboFile.php index 964164a..5140624 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -333,14 +333,19 @@ class RoboFile extends \Robo\Tasks { * available in $PATH. */ public function manpage(): Result { + $t = $this->collectionBuilder(); $p = $this->taskParallelExec(); $man = [ 'en' => "man1/arsse.1", ]; foreach($man as $src => $out) { - $p->process("pandoc -s -f markdown-smart -t man -o ".escapeshellarg(BASE."dist/$out")." ".escapeshellarg(BASE."manpages/$src.md")); + $src = BASE."manpages/$src.md"; + $out = BASE."dist/man/$out"; + $t->addTask($this->taskFilesystemStack()->mkdir(dirname($out), 0755)); + $p->process("pandoc -s -f markdown-smart -t man -o ".escapeshellarg($out)." ".escapeshellarg($src)); } - return $p->run(); + $t->addTask($p); + return $t->run(); } protected function changelogParse(string $text, string $targetVersion): array {