Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return output and code from context.run #4

Closed
pawamoy opened this issue Feb 16, 2021 · 0 comments
Closed

Return output and code from context.run #4

pawamoy opened this issue Feb 16, 2021 · 0 comments

Comments

@pawamoy
Copy link
Owner

pawamoy commented Feb 16, 2021

Is your feature request related to a problem? Please describe.
One might want to store the output of a command in a variable while in a duty. Currently it's not possible to use ctx.run for that because it doesn't return anything.

Describe the solution you'd like
Ideally ctx.run would return something similar to subprocess.run: an object containing the output and return code of the command. This way, we can still use ctx.run normally, and if needed store its result in a variable for further processing.

Describe alternatives you've considered
Running subprocess manually. It feels redundant.

Additional context
failprint will have to be modified as well, to return both output and exit code of a command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant