예제 #1
0
    def remove_command(self, project, name):
        """Remove a command from anaconda-project.yml.

        Returns a ``Status`` subtype (it won't be a
        ``RequirementStatus`` as with some other functions, just a
        plain status).

        Args:
           project (Project): the project
           name (string): name of the command to be removed

        Returns:
           a ``Status`` instance
        """
        return project_ops.remove_command(project=project, name=name)
예제 #2
0
def remove_command(project_dir, name):
    """Remove a command from the project.

    Returns:
        int exit code
    """
    project = load_project(project_dir)

    status = project_ops.remove_command(project, name)
    if not status:
        console_utils.print_status_errors(status)
        return 1
    else:
        print("Removed the command '{}' from the project.".format(name))
        return 0