Skip to content

Commit

Permalink
Don't save empty config
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 12, 2024
1 parent c5eaba8 commit 961e451
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions monorepo/DevTools/src/RefactorConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ protected function migrateToYaml(): void

$yaml = Yaml::dump($config, 16, 4, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK | Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE);

if ($yaml === '[]') {
$this->warn("You don't seem to have any configuration to migrate.");
return;
}

file_put_contents(Hyde::path('hyde.yml'), $yaml);
}

Expand Down

0 comments on commit 961e451

Please sign in to comment.