Skip to content

Commit

Permalink
Fix isDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Sánchez committed Mar 7, 2023
1 parent 9a43797 commit 0557cdc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/changelog-manager.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

return [
'directory' => env('BITPANDA_CHANGELOG_GENERATOR_DIRECTORY', app_path('../changelog/')),
'directory' => env('CHANGELOG_GENERATOR_DIRECTORY', app_path('../changelog/')),
'allowed_types' => [
'added',
'changed',
Expand Down
5 changes: 5 additions & 0 deletions src/Commands/AddChangelogCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public function handle(): int
}

$view = view('changelog-manager::changelog-manager.changelog', compact('changelogType', 'taskNumber', 'taskDescription'));

if (!File::isDirectory(config('changelog-manager.directory'))) {
File::makeDirectory(config('changelog-manager.directory'));
}

$path = config('changelog-manager.directory') . '/' . $taskNumber . '.yaml';
File::put($path, $view->render());

Expand Down

0 comments on commit 0557cdc

Please sign in to comment.