(imported comment written by SystemAdmin)
Does the Fixlet Debugger accurately mirror the way BES will initiate actions involving manipulated exit codes?
Any time I try to echo out (exit code of action) I continuously receive what looks like a random number, which would ALWAYS make {exit code of action = 0} false, and !=0} true
Manipulating the exit code with:
exit 123whatever
results in a client log that says:
Command succeeded (123) exit 123
- Result —
Evaluation failed!
…but a runtime error on the “exit” line "an unknown error occurred. Which I would think means that anytime an exit code is manipulated in this way one would cause the entire action to fail.
Again, I don’t think I have a good handle on how to use error codes in BigFix yet, so I may be mis-interpreting.
Code I’m using to demonstrate error code output:
Failure:
wait cmd /c fake run cmd /k echo
"Failure code: "
{(exit code of action)
}
Success:
wait cmd /c dir run cmd /k echo
"Success code: "
{(exit code of action)
}
In your third example:
wait cmd /c dir
if {exit code of action != 0}
exit 123
endif
The first line exits with Code=0 as seen in the Client Log yet {exit code of action} is not zero which makes the if/then true and the line exit 123 creates a runtime error.