return build exit code when not last command