From ff774feb2ab811e5cce29850dabdaf37dc7378ed Mon Sep 17 00:00:00 2001 From: Andy Waite <13400+andyw8@users.noreply.github.com> Date: Wed, 29 Jan 2025 10:31:43 -0500 Subject: [PATCH] Use `system` --- lib/ruby_lsp/tapioca/run_gem_rbi_check.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ruby_lsp/tapioca/run_gem_rbi_check.rb b/lib/ruby_lsp/tapioca/run_gem_rbi_check.rb index 3d7cb9c4a..1654dfd6b 100644 --- a/lib/ruby_lsp/tapioca/run_gem_rbi_check.rb +++ b/lib/ruby_lsp/tapioca/run_gem_rbi_check.rb @@ -34,8 +34,7 @@ def run sig { returns(T::Boolean) } def git_repo? - _, status = Open3.capture2e("git rev-parse --is-inside-work-tree", chdir: project_path) - T.must(status.success?) + !!system("git rev-parse --is-inside-work-tree", chdir: project_path) end sig { returns(T::Boolean) } @@ -125,8 +124,8 @@ def log_message(message) end def execute_in_project_path(*parts) - stdout_and_stderr_str, _status = T.unsafe(Open3).capture2e(*parts, chdir: project_path) - stdout_and_stderr_str + stdout_and_stderr, _status = T.unsafe(Open3).capture2e(*parts, chdir: project_path) + stdout_and_stderr end end end