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

Wait for command exit code #340

Open
W1M0R opened this issue Oct 16, 2024 · 0 comments
Open

Wait for command exit code #340

W1M0R opened this issue Oct 16, 2024 · 0 comments

Comments

@W1M0R
Copy link

W1M0R commented Oct 16, 2024

Sometimes I need a cross-platform (windows and linux) way to wait for a certain command invocation to succeed or fail. Most examples that I've seen require writing a while-loop in your favourite scripting language.

It would be nice if wait4x could have a command mode that would essentially allow those platform-specific shell scripts to be reduced to a cross-platform one-liner:

# This command waits until `just check-foo` has a success exit-code:
wait4x command 'just check-foo' 
# This command waits until `just check-foo` has a no success exit-code:
wait4x command 'just check-foo' --reverse
# This command waits until `just check-foo` has a specific exit-code 1:
wait4x command 'just check-foo' --expect-exit-code 1
# This command waits until `just check-foo` has any exit-code that is not 0:
wait4x command 'just check-foo' --expect-exit-code-not 0
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