From 8f99c93f0fe69f1bc6edb693c19111365858503c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Wed, 16 Mar 2022 18:15:44 +0200 Subject: [PATCH] Fix metrics.json path --- xtask/src/metrics.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xtask/src/metrics.rs b/xtask/src/metrics.rs index aa700d715d..27dae5a449 100644 --- a/xtask/src/metrics.rs +++ b/xtask/src/metrics.rs @@ -51,10 +51,14 @@ impl flags::Metrics { "git clone --depth 1 https://{metrics_token}@github.com/rust-analyzer/metrics.git" ) .run()?; - let _d = sh.push_dir("metrics"); - let mut file = fs::File::options().append(true).open("metrics.json")?; - writeln!(file, "{}", metrics.json())?; + { + let mut file = + fs::File::options().append(true).open("target/metrics/metrics.json")?; + writeln!(file, "{}", metrics.json())?; + } + + let _d = sh.push_dir("metrics"); cmd!(sh, "git add .").run()?; cmd!(sh, "git -c user.name=Bot -c user.email=dummy@example.com commit --message 📈") .run()?;