Skip to content

Commit 1eae834

Browse files
committed
refactor: Accurate command finishing
1 parent 47a6f8a commit 1eae834

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

system/Commands/Translation/LocalizationSync.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ public function run(array $params)
8989
$this->languagePath = SUPPORTPATH . 'Language';
9090
}
9191

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

96+
CLI::write('All operations done!');
97+
9698
return EXIT_SUCCESS;
9799
}
98100

@@ -130,7 +132,7 @@ private function process(string $originalLocale, string $targetLocale): int
130132
);
131133

132134
/**
133-
* @var list<SplFileInfo> $files
135+
* @var array<non-empty-string, SplFileInfo> $files
134136
*/
135137
$files = iterator_to_array($iterator, true);
136138
ksort($files);

0 commit comments

Comments
 (0)