From 168c370d771e1a12284a68f407ee37137e0137fe Mon Sep 17 00:00:00 2001 From: Samuel Grahn Date: Mon, 9 Dec 2024 11:47:33 +0100 Subject: [PATCH] Revert "Add config option for Elan self-update" This reverts commit 8c80c7a7d63ecd0936e0bd5cb07c2cbb1452c1fd. --- src/config.rs | 18 ------------------ src/steps/generic.rs | 10 ++++------ 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/config.rs b/src/config.rs index 52e733e6..deafae4f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -377,12 +377,6 @@ pub struct Composer { self_update: Option, } -#[derive(Deserialize, Default, Debug, Merge)] -#[serde(deny_unknown_fields)] -pub struct Elan { - self_update: Option, -} - #[derive(Deserialize, Default, Debug, Merge)] #[serde(deny_unknown_fields)] pub struct Vim { @@ -515,9 +509,6 @@ pub struct ConfigFile { #[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)] deno: Option, - #[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)] - elan: Option, - #[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)] vim: Option, @@ -1254,15 +1245,6 @@ impl Config { .unwrap_or(false) } - /// Whether Elan should update itself - pub fn elan_self_update(&self) -> bool { - self.config_file - .elan - .as_ref() - .and_then(|c| c.self_update) - .unwrap_or(true) - } - /// Whether to force plug update in Vim pub fn force_vim_plug_update(&self) -> bool { self.config_file diff --git a/src/steps/generic.rs b/src/steps/generic.rs index abd7dba7..1d125583 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -258,12 +258,10 @@ pub fn run_elan(ctx: &ExecutionContext) -> Result<()> { let elan = require("elan")?; print_separator("elan"); - if ctx.config().elan_self_update() { - ctx.run_type() - .execute(&elan) - .args(["self", "update"]) - .status_checked()?; - } + ctx.run_type() + .execute(&elan) + .args(["self", "update"]) + .status_checked()?; ctx.run_type().execute(&elan).arg("update").status_checked() }