From ab9c9ea412b406cacc81abfceccbcef8afd1ba0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Thu, 26 Dec 2024 14:59:30 +0000 Subject: [PATCH] generate: tweaks --- devenv/src/cli.rs | 4 ++-- devenv/src/devenv.rs | 10 ++-------- devenv/src/main.rs | 4 ++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/devenv/src/cli.rs b/devenv/src/cli.rs index b925487fa..ce253ac7a 100644 --- a/devenv/src/cli.rs +++ b/devenv/src/cli.rs @@ -191,7 +191,7 @@ pub enum Commands { #[arg(num_args=0.., trailing_var_arg = true)] description: Vec, - #[clap(long, default_value = "https://generate.devenv.sh")] + #[clap(long, default_value = "https://devenv.new")] host: String, #[arg( @@ -203,7 +203,7 @@ pub enum Commands { // https://consoledonottrack.com/ #[clap(long, env = "DO_NOT_TRACK", action = clap::ArgAction::SetTrue)] - disable_telemetry: bool, + disable_analytics: bool, }, #[command(about = "Activate the developer environment. https://devenv.sh/basics/")] diff --git a/devenv/src/devenv.rs b/devenv/src/devenv.rs index 28cda09f6..9e2132b10 100644 --- a/devenv/src/devenv.rs +++ b/devenv/src/devenv.rs @@ -191,18 +191,12 @@ impl Devenv { description: Option, host: &str, exclude: Vec, - disable_telemetry: bool, + disable_analytics: bool, ) -> Result<()> { - // TODO: get nixpkgs revision and devenv revision - let nixpkgs_rev = ""; - let devenv_rev = ""; - let client = reqwest::Client::new(); let mut request = client .post(host) - .query(&[("disable_telemetry", disable_telemetry)]) - .query(&[("nixpkgs", nixpkgs_rev)]) - .query(&[("devenv", devenv_rev)]) + .query(&[("disable_analytics", disable_analytics)]) .header(reqwest::header::USER_AGENT, crate_version!()); let (asyncwriter, asyncreader) = tokio::io::duplex(256 * 1024); diff --git a/devenv/src/main.rs b/devenv/src/main.rs index cfb8da53b..4adf3e817 100644 --- a/devenv/src/main.rs +++ b/devenv/src/main.rs @@ -133,7 +133,7 @@ async fn main() -> Result<()> { description, host, exclude, - disable_telemetry, + disable_analytics, } => { devenv .generate( @@ -144,7 +144,7 @@ async fn main() -> Result<()> { }, &host, exclude, - disable_telemetry, + disable_analytics, ) .await }