forked from Wavyzz/dolibarr
Fix CLI tools must return a positive value on error for better cross
platform compatibility
This commit is contained in:
@@ -34,7 +34,7 @@ $path = __DIR__.'/';
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit(-1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@set_time_limit(0); // No timeout for this script
|
||||
@@ -69,7 +69,7 @@ dol_syslog($script_file." launched with arg ".join(',', $argv));
|
||||
if (empty($argv[1])) {
|
||||
print "Usage: $script_file subdirtoscan (test|confirm)\n";
|
||||
print "Example: $script_file propale test\n";
|
||||
exit(-1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
print '--- start'."\n";
|
||||
|
||||
Reference in New Issue
Block a user