Hi Jeff,
On 09/24/2010 10:22 PM, Jeff Forcier wrote:
Hi David,
On Fri, Sep 24, 2010 at 1:33 AM, David<da...@silveregg.co.jp> wrote:
I am using fabric for some simple test deployment scripts, and I have
encountered a slightly annoying behavior when local(some_cmd) fails. In that
case, the output of local is not displayed, making debugging the issue a bit
difficult.
I'm not sure what your exact code structure is (it's usually helpful
to include at least a small snippet when posting ;)) but if you're not
specifying capture=False, local() captures the output by default,
instead of displaying it:
My issue is not capturing the output, my issue is to show the output at
all when there is a failure. Here is a somewhat contrived example
import random
from fabric.api import local
def foo():
cmd = "ls"
if random.randint(0, 1) == 0:
cmd += "s"
local(cmd)
The command will randomly fail. At that point, I don't see a way to
show the output, as a failure in local abort the whole script. I do not
want to see the output when the command succeeds.
cheers,
David
_______________________________________________
Fab-user mailing list
Fab-user@nongnu.org
http://lists.nongnu.org/mailman/listinfo/fab-user