Crates.io | waitz |
lib.rs | waitz |
version | 0.3.0 |
source | src |
created_at | 2021-06-23 18:28:02.792732 |
updated_at | 2022-04-15 10:05:15.031585 |
description | Waits (retries) a command until it exits with 0 |
homepage | https://github.com/mstruebing/waitz |
repository | https://github.com/mstruebing/waitz |
max_upload_size | |
id | 414074 |
size | 19,923 |
A rust utility to wait that a program exits with 0.
You need to wait for something to start up and don't know when it finishes? You want to chain some other commands after it? You want to run a bunch of commands and drink a coffee? Than this is a tool for you.
I initially wrote it to start docker and run some processes after it, but you can do way more with it, like waiting for a specific URL to become available after booting up a server in the background or anything else.
waitz docker ps && npm run <script> && npm run <other-script>
waitz 'curl --fail <non-existing-url>' && ./script.sh
USAGE:
waitz [FLAGS] [OPTIONS] <COMMAND>...
FLAGS:
--debug Outputs debug information
-h, --help Prints help information
-n, --no-retry Don't try to rerun the command in case it fails with non-zero exit code
-V, --version Prints version information
--verbose Forwards stdout/stderr from the command to the terminal
OPTIONS:
-i, --interval <interval> in which interval the command should be retried in milliseconds [default: 1000]
-r, --max-retries <max-retries> Positive integer how often the command should be retried [default: 0]
ARGS:
<COMMAND>... Which command should be waited for
cargo install waitz
Clone the repository and run cargo build --release
and you should find the binary in ./target/release/waitz
.
Or grab a binary from the release page
The CI will lint your commit message with commitlint.