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

Timeout isn't working as expected if both stdout and stderr are redirected #65

Open
dmeremyanin opened this issue Sep 9, 2023 · 0 comments
Labels

Comments

@dmeremyanin
Copy link

Describe the problem

Timeout isn't working as expected if both stdout and stderr are redirected.

Steps to reproduce the problem

TTY::Command.new(printer: :quiet).run!('sleep 5', timeout: 1, [:out, :err] => '/dev/null')

Actual behaviour

The code above doesn't fail. It takes 5 seconds to run and ignores the timeout option set to 1 second.

Expected behaviour

The code above should raise an exception.

Describe your environment

  • OS version: macOS Ventura 13.5 / Debian 12
  • Ruby version: 3.2.2
  • TTY::Command version: 0.10.1
@dmeremyanin dmeremyanin added the bug label Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant