Skip to content

Commit 9da7c34

Browse files
committed
Add env arg for --user-agent
1 parent dce3657 commit 9da7c34

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $ task-mon --ping-key abcd1234 --slug foo -- some_command --to --monitor
3636
```shell
3737
$ crontab -e
3838
# m h dom mon dow command
39-
8 6 * * * /usr/local/cargo/bin/task-mon --uuid 1234-abcd -- some_command --to --monitor
39+
8 6 * * * /usr/local/cargo/bin/task-mon --uuid 1234-abcd -- /path/to/some_command --to --monitor
4040
```
4141

4242
`task-mon` will run the command and ping Healthchecks.io when it completes, reporting the exit
@@ -70,7 +70,7 @@ OPTIONS:
7070
--env Also POSTs the process environment; requires --detailed
7171
--verbose Write debugging details to stderr
7272
--user-agent <USER_AGENT> Customize the user-agent string sent to the Healthchecks.io
73-
server
73+
server [env: HEALTHCHECKS_USER_AGENT=]
7474
--base-url <BASE_URL> Base URL of the Healthchecks.io server to ping [env:
7575
HEALTHCHECKS_BASE_URL=] [default: https://hc-ping.com]
7676
-h, --help Print help information
@@ -79,7 +79,7 @@ OPTIONS:
7979
8080
## Related projects
8181
82-
There are, unsurprisingly, of similar projects out there, but I thought it'd be a fun opportunity to write a little
82+
There are, unsurprisingly, a number of similar projects out there, but I thought it'd be a fun opportunity to write a little
8383
Rust. And of course I like my API best :)
8484

8585
* [Runitor](https://github.com/bdd/runitor) - linked from the

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ struct Cli {
172172
verbose: bool,
173173

174174
/// Customize the user-agent string sent to the Healthchecks.io server
175-
#[clap(long, value_name="USER_AGENT")]
175+
#[clap(long, env="HEALTHCHECKS_USER_AGENT", value_name="USER_AGENT")]
176176
user_agent: Option<String>,
177177

178178
/// Base URL of the Healthchecks.io server to ping

0 commit comments

Comments
 (0)