N°4541 - no failure exit code captured when csv a import fails in CLI mode

This commit is contained in:
odain
2021-12-17 16:46:38 +01:00
committed by Molkobain
parent 682c821d0e
commit 20a07d61c6

View File

@@ -225,7 +225,7 @@ catch(Exception $e)
{
$oP->p("Error: ".$e->GetMessage());
$oP->output();
exit -2;
exit(-2);
}
if (utils::IsModeCLI())
@@ -244,14 +244,14 @@ if (utils::IsModeCLI())
{
$oP->p("Access restricted or wrong credentials ('$sAuthUser')");
$oP->output();
exit -1;
exit(-1);
}
if (!is_readable($sCsvFile))
{
$oP->p("Input file could not be found or could not be read: '$sCsvFile'");
$oP->output();
exit -1;
exit(-1);
}
$sCSVData = file_get_contents($sCsvFile);