You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I sometimes find myself doing ctx.run("bash -c 'cd dir && actual command'") in order to run a command in another directory.
It's a bit annoying because then it's a shell command and I must quote properly, with the problems that follow.
Describe the solution you'd like
Instead, I'd like to be able to change directory with an option or a context manager:
# with an option@dutydeftask(ctx):
ctx.run(["actual", "command"], workdir="subfolder")
@dutydeftask(ctx):
withctx.workdir("subfolder"):
ctx.run(["actual", "command"])
In fact, we could extrapolate and offer a context manager for all the available options:
Is your feature request related to a problem? Please describe.
I sometimes find myself doing
ctx.run("bash -c 'cd dir && actual command'")
in order to run a command in another directory.It's a bit annoying because then it's a shell command and I must quote properly, with the problems that follow.
Describe the solution you'd like
Instead, I'd like to be able to change directory with an option or a context manager:
In fact, we could extrapolate and offer a context manager for all the available options:
Describe alternatives you've considered
The
bash -c 'cd &&
hack.The text was updated successfully, but these errors were encountered: