Skip to content

cmSystemTools: Change RunSingleCommand return value based on process exit code

lemonade-dm requested to merge lumberyard-employee-dm/cmake:Issue_20790 into master

This is a Merge Request to fix issue #20790 (closed).

The issue is that the cmSystemTools::RunSingleCommand function will not set the result variable, if the optional int* retVal parameter is supplied to that function and the executing process exited. In that case the retVal parameter gets populated with the exit code of the process, but the result variable was not set.

This meant that the RunSingleCommand function would return true in scenarios where the command itself had a non-zero exit code

Edited by Brad King

Merge request reports