From b599493600b644395007f78a3dabaaac5af5a33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= <7822554+AlexTMjugador@users.noreply.github.com> Date: Tue, 20 Aug 2024 12:24:13 +0200 Subject: [PATCH] docs: mention `quickinstall` telemetry collection in `--help` and README (#1890) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: mention `quickinstall` telemetry collection in `--help` and README These changes describe the usage statistics collected when the `quickinstall` strategy is used by default, according to the discussion and details brought forward on https://github.com/cargo-bins/cargo-binstall/issues/1884. Both the project README and the CLI long help contain clear disclosures of such statistics collection now. Signed-off-by: Alejandro González * docs: add some more data collection details Signed-off-by: Alejandro González --------- Signed-off-by: Alejandro González --- README.md | 15 +++++++++++++++ crates/bin/src/args.rs | 8 +++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 472e3ff7..2a40466b 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,21 @@ You can find a full description of errors including exit codes here: . +Should you be interested on it, the backend code for these endpoints can be found at . + +If you prefer not to participate in this data collection, you can opt out by any of the following methods: + +- Setting the `--disable-telemetry` flag in the command line interface. +- Setting the `BINSTALL_DISABLE_TELEMETRY` environment variable to `true`. +- Disabling the `quickinstall` strategy with `--disable-strategy quick-install`, or if specifying a list of strategies to use with `--strategy`, avoiding including `quickinstall` in that list. +- Adding `quick-install` to the `disabled-strategies` configuration key in the crate metadata (refer to [the related support documentation](SUPPORT.md#support-for-cargo-binstall) for more details). + --- If you have ideas/contributions or anything is not working the way you expect (in which case, please include an output with `--log-level debug`) and feel free to open an issue or PR. diff --git a/crates/bin/src/args.rs b/crates/bin/src/args.rs index 1eab39c4..9c460013 100644 --- a/crates/bin/src/args.rs +++ b/crates/bin/src/args.rs @@ -25,7 +25,13 @@ use zeroize::Zeroizing; #[clap( version, about = "Install a Rust binary... from binaries!", - after_long_help = "License: GPLv3. Source available at https://github.com/cargo-bins/cargo-binstall", + after_long_help = + "License: GPLv3. Source available at https://github.com/cargo-bins/cargo-binstall\n\n\ + Some crate installation strategies may collect anonymized usage statistics by default. \ + If you prefer not to participate on such data collection, you can opt out by using the \ + `--disable-telemetry` flag or its associated environment variable. For more details \ + about this data collection, please refer to the mentioned flag or the project's README \ + file", arg_required_else_help(true), // Avoid conflict with version_req disable_version_flag(true),