From 74f4ad779823f20a0a184a9a7dc0021ad7712dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CA=9C=C9=AA=E1=B4=8D=E1=B4=9C=CA=80=E1=B4=80=20Yu=CC=84?= Date: Fri, 20 Dec 2024 18:24:57 +0900 Subject: [PATCH] fix(ruby): fix Ruby plugin to use `ruby_install` option correctly --- src/plugins/core/ruby.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/core/ruby.rs b/src/plugins/core/ruby.rs index b49d643167..5fd262ac4c 100644 --- a/src/plugins/core/ruby.rs +++ b/src/plugins/core/ruby.rs @@ -50,9 +50,9 @@ impl RubyPlugin { fn lock_build_tool(&self) -> Result { let settings = Settings::get(); let build_tool_path = if settings.ruby.ruby_install { - self.ruby_build_bin() - } else { self.ruby_install_bin() + } else { + self.ruby_build_bin() }; LockFile::new(&build_tool_path) .with_callback(|l| { @@ -65,10 +65,11 @@ impl RubyPlugin { let pr = ctx.map(|ctx| ctx.pr.as_ref()); if SETTINGS.ruby.ruby_install { self.update_ruby_install(pr) - .wrap_err("failed to update ruby-install")?; + .wrap_err("failed to update ruby-install") + } else { + self.update_ruby_build(pr) + .wrap_err("failed to update ruby-build") } - self.update_ruby_build(pr) - .wrap_err("failed to update ruby-build") } fn install_ruby_build(&self, pr: Option<&dyn SingleReport>) -> Result<()> {