Skip to content

abort() doubles the output message #1318

@4hr1m4n

Description

@4hr1m4n

If abort() is called with a message, like in the code below, and output.aborts is True (default), then the message is displayed twice.

from fabric.api import abort, task

@task()
def test():
    abort("Mxyzptlk")

This is the output of fab test:

Fatal error: Mxyzptlk

Aborting.
Mxyzptlk

This behavior was introduced by 96043d6. Not sure why though.

I propose either to roll it back or, if there is a good reason for that change, make it to something like this:

        sys.exit(1 if output.aborts else msg)

PS: I've also reported this issue on fab-user mailing list back in March 13th

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions