Skip to content

[master] role-export: Can't export to stdout (filename is hard requirement) #527

@danowar2k

Description

@danowar2k

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions