Consloe commands should pass return value from CConsoleCommand::run as process return code

would be better if you could write:




class CustomCmdCommand extends CConsoleCommand {

  public function run( $args ) {

    return 112;

  }

}



and this should pass returned int as process return code (as in php exit(112) command) so you could check it in system shell:




yiic customCmd

if [ $? == 112 ]; then

  FAILED WITH 112 CODE...

fi



now you have to do hacks and call php exit(112) directly which kills all application callstack and can lead to some problems if application stack is not closed properly. It is not very pretty either :)

Interesting suggestion. Please duplicate it as an issue: http://code.google.com/p/yii/issues/list

done :)

http://code.google.com/p/yii/issues/detail?id=2157&q=CConsoleCommand&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Stars%20Summary