Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mstruebing/waitz
Waits until the exit code of a program is zero
https://github.com/mstruebing/waitz
hacktoberfest
Last synced: 5 days ago
JSON representation
Waits until the exit code of a program is zero
- Host: GitHub
- URL: https://github.com/mstruebing/waitz
- Owner: mstruebing
- Created: 2021-06-15T20:13:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-15T10:04:33.000Z (over 2 years ago)
- Last Synced: 2024-11-01T21:51:35.528Z (12 days ago)
- Topics: hacktoberfest
- Language: Rust
- Homepage:
- Size: 63.5 KB
- Stars: 15
- Watchers: 3
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Waitz
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 && npm run <other-script>`
- `waitz 'curl --fail <non-existing-url>' && ./script.sh`# Usage
```
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 terminalOPTIONS:
-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
```# Installation
## Crates.io
`cargo install waitz`
## Raw
Clone the repository and run `cargo build --release` and you should find the binary in `./target/release/waitz`.
## Release Page
Or grab a binary from the [release page](https://github.com/mstruebing/waitz/releases)
# Contribution
- Fork this project
- Create a branch
- Provide a pull requestThe CI will lint your commit message with [commitlint](https://commitlint.js.org/#/).