Is there a way for the automation tool to return the true exit code?

we were running a cook job with this command:

BuildCookRun -nop4 -cook -allmaps -prereqs -manifests -build -compile -pak -stage -NumCookersToSpawn=32 -project=C:\ourpath\ourgamename.uproject -targetplatform=Win64 -clientconfig=Test -stagingDirectory=C:\anotherpath\ -CrashReporter -compile

and we got this error:

[15:04:59] : [Step 8/17] Took 766.7288822s to run UE4Editor-Cmd.exe, ExitCode=1
[15:04:59] : [Step 8/17] ERROR: Cook failed.
[15:04:59] : [Step 8/17] (see C:\somelogpath\Log.txt for full exception trace)
[15:05:00] : [Step 8/17] AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
[15:05:00] : [Step 8/17] BUILD FAILED
[15:05:00] : [Step 8/17] Process exited with code 0

so the command to run the automation tool had an exit code of 0, but when the actual failed job had an exit code of 25.

how can we pipe the real exit code out?

please help me if someone happens to know. thanks so much in advance.