Your docs for role-export say:
* @example This example will write XML contents to a specific file
* $ php moosh.php role-export -f target_file.xml ROLENAME
*
* @example This example will output XML contents to stdout
* $ php moosh.php role-export ROLENAME
*
* @example This example will output pretty printed XML contents to stdout
* $ php moosh.php role-export --pretty ROLENAME
*
But your code for role-export does:
$filepath = $this->expandedOptions['file'];
if (!$filepath) {
printf("Invalid output path value '%s'\n", $filepath);
exit(1);
}
If there is no filepath given, moosh stops. So outputting to a file is currently the only way...