Skip to content

Commit 10c81bc

Browse files
committed
fix: Return with a constant exit code
1 parent 3145772 commit 10c81bc

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎system/Commands/Translation/LocalizationFinder.php‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function run(array $params)
6363
if (! in_array($optionLocale, config(App::class)->supportedLocales, true)) {
6464
CLI::error('Error: Supported locales ' . implode(', ', config(App::class)->supportedLocales));
6565

66-
return -1;
66+
return EXIT_USER_INPUT;
6767
}
6868

6969
$currentLocale = $optionLocale;
@@ -75,13 +75,13 @@ public function run(array $params)
7575
if (false === $tempCurrentDir) {
7676
CLI::error('Error: Dir must be located in ' . $currentDir);
7777

78-
return -1;
78+
return EXIT_USER_INPUT;
7979
}
8080

8181
if (str_starts_with($tempCurrentDir, $this->languagePath)) {
8282
CLI::error('Error: Dir ' . $this->languagePath . ' restricted to scan.');
8383

84-
return -1;
84+
return EXIT_USER_INPUT;
8585
}
8686

8787
$currentDir = $tempCurrentDir;
@@ -154,6 +154,8 @@ public function run(array $params)
154154
$this->writeIsVerbose('Files found: ' . $countFiles);
155155
$this->writeIsVerbose('New translates found: ' . $countNewKeys);
156156
CLI::write('All operations done!');
157+
158+
return EXIT_SUCCESS;
157159
}
158160

159161
/**

0 commit comments

Comments
 (0)