-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Labels
Milestone
Description
Almost every time I write a script to execute shell commands, I end up with a function that looks roughly like this:
def run(cmd, dryrun=False):
if dryrun:
# Just print cmd or maybe return cmd with some other data.
else:
# Actually run it with subprocess, typically returning stdout, exitcode, cmd, etc
This sort of thing is very handy for development work and debugging. It is also a useful thing to have if you want to write unit tests for your code.
Our team uses Fabric a lot and I created a module that wraps Fabric in a class that supports dryrun, but this effort was fairly awkward and requires a certain amount of carefulness from users of the class.
Are there plans to include dryrun behavior in Invoke and ultimately in Fabric 2.0? I don't see anything in the docs or invoke codebase so far. I'd be willing to lend a hand, but wanted to get a reality check first.
Thanks.
jdevera and brutus