Skip to content

Commit

Permalink
Revert "Add config option for Elan self-update"
Browse files Browse the repository at this point in the history
This reverts commit 8c80c7a.
  • Loading branch information
grahnen committed Dec 9, 2024
1 parent 40bca6b commit 168c370
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
18 changes: 0 additions & 18 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,6 @@ pub struct Composer {
self_update: Option<bool>,
}

#[derive(Deserialize, Default, Debug, Merge)]
#[serde(deny_unknown_fields)]
pub struct Elan {
self_update: Option<bool>,
}

#[derive(Deserialize, Default, Debug, Merge)]
#[serde(deny_unknown_fields)]
pub struct Vim {
Expand Down Expand Up @@ -515,9 +509,6 @@ pub struct ConfigFile {
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
deno: Option<Deno>,

#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
elan: Option<Elan>,

#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
vim: Option<Vim>,

Expand Down Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions src/steps/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit 168c370

Please sign in to comment.