Skip to content

Commit

Permalink
refactor: Accurate command finishing
Browse files Browse the repository at this point in the history
  • Loading branch information
neznaika0 committed Jan 11, 2025
1 parent 47a6f8a commit 1eae834
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions system/Commands/Translation/LocalizationSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ public function run(array $params)
$this->languagePath = SUPPORTPATH . 'Language';
}

if ($this->process($optionLocale, $optionTargetLocale) === EXIT_SUCCESS) {
CLI::write('All operations done!');
if ($this->process($optionLocale, $optionTargetLocale) === EXIT_ERROR) {
return EXIT_ERROR;
}

CLI::write('All operations done!');

return EXIT_SUCCESS;
}

Expand Down Expand Up @@ -130,7 +132,7 @@ private function process(string $originalLocale, string $targetLocale): int
);

/**
* @var list<SplFileInfo> $files
* @var array<non-empty-string, SplFileInfo> $files
*/
$files = iterator_to_array($iterator, true);
ksort($files);
Expand Down

0 comments on commit 1eae834

Please sign in to comment.