diff --git a/src/StubsManager.php b/src/StubsManager.php index 13d6e22..b891312 100644 --- a/src/StubsManager.php +++ b/src/StubsManager.php @@ -89,6 +89,10 @@ public function convertStubs($forceOverwrite = false) $newContent = str_replace($this->stub['placeholder'], $this->getName(), $stubContent); + if (!file_exists($this->stub['output_path'])) { + mkdir($this->stub['output_path'], 0755, true); + } + if (!file_put_contents($outputFile, $newContent)) { throw new Exception('Could not write to ' . $outputFile); }