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

Option to pass standard input #3

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

Option to pass standard input #3

pawamoy opened this issue Feb 16, 2021 · 2 comments

Comments

@pawamoy
Copy link
Owner

pawamoy commented Feb 16, 2021

Is your feature request related to a problem? Please describe.
To pass standard input to a command, one must use subprocess manually again.

Describe the solution you'd like
Instead of having to run a subprocess manually, provide an option to pass standard input to a command.

Describe alternatives you've considered
Using subprocess to manually pass standard input.

    def _run_safety():
        process = subprocess.run(cmd, input=dependencies, encoding="utf8", stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
        print(process.stdout, end="")
        return process.returncode

    ctx.run(_run_safety, title="Checking absence of CVEs", pty=pty)
@pawamoy
Copy link
Owner Author

pawamoy commented Jun 26, 2021

For reference: pexpect/ptyprocess#57

@pawamoy
Copy link
Owner Author

pawamoy commented Aug 1, 2021

Now possible thanks to failprint 0.8.

@pawamoy pawamoy closed this as completed Aug 1, 2021
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