Skip to content

Commit

Permalink
Add more detail to the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
minfrin committed Jan 13, 2020
1 parent bd6563a commit 653cca4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# retry
Retry a command until the command succeeds.

Retry captures stdin into memory as the data is passed to the repeated
command, and this captured stdin is then replayed should the command be
repeated. This makes it possible to embed the retry tool into shell pipelines.

Retry captures stdout into memory, and if the command was successful stdout
is passed on to stdout as normal, while if the command was repeated stdout is
passed to stderr instead. This ensures that output is passed to stdout once
and once only.

# example
```
~$ retry --until=success false
Expand All @@ -9,3 +18,9 @@ retry: 'false' returned 1, backing off for 10 seconds and trying again...
retry: 'false' returned 1, backing off for 10 seconds and trying again...
^C
```

# more complex example
```
~$ retry curl --fail http://localhost/entities | jq ... | retry curl --fail -X POST http://localhost/entities
```

0 comments on commit 653cca4

Please sign in to comment.