Skip to content

Commit

Permalink
Safeguard deletion of programmatic-types.graphql in `artisan lighth…
Browse files Browse the repository at this point in the history
…ouse:ide-helper`

#1407
  • Loading branch information
spawnia committed Jun 5, 2020
1 parent 853f89a commit 1037be8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ You can find and compare releases at the [GitHub release page](https://github.co

## Unreleased

## 4.14.1

### Fixed

- Safeguard deletion of `programmatic-types.graphql` in `artisan lighthouse:ide-helper`

## 4.14.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Console/IdeHelperCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ protected function programmaticTypes(TypeRegistry $typeRegistry): void

$filePath = static::programmaticTypesPath();

if ($types->isEmpty()) {
if ($types->isEmpty() && file_exists($filePath)) {
unlink($filePath);

return;
Expand Down

0 comments on commit 1037be8

Please sign in to comment.