@@ -48,10 +48,8 @@ def setup_runtime_dependencies(self, logger: MultilspyLogger, config: MultilspyC
48
48
Setup runtime dependencies for Solargraph.
49
49
"""
50
50
platform_id = PlatformUtils .get_platform_id ()
51
- cat_cmd = "cat"
52
51
which_cmd = "which"
53
52
if platform_id in [PlatformId .WIN_x64 , PlatformId .WIN_arm64 , PlatformId .WIN_x86 ]:
54
- cat_cmd = "type"
55
53
which_cmd = "where"
56
54
57
55
with open (os .path .join (os .path .dirname (__file__ ), "runtime_dependencies.json" ), "r" ) as f :
@@ -62,15 +60,11 @@ def setup_runtime_dependencies(self, logger: MultilspyLogger, config: MultilspyC
62
60
63
61
# Check if Ruby is installed
64
62
try :
65
- result = subprocess .run ([cat_cmd , ".ruby-version" ], capture_output = True , cwd = repository_root_path )
66
- expected_ruby_version = result .stdout .strip ()
67
63
result = subprocess .run (["ruby" , "--version" ], check = True , capture_output = True , cwd = repository_root_path )
68
- actual_ruby_version = result .stdout .strip ()
69
- if expected_ruby_version not in actual_ruby_version :
70
- raise RuntimeError (f"Expected Ruby version { expected_ruby_version } but found { actual_ruby_version } " )
71
- logger .log (f"Ruby version: { actual_ruby_version } " , logging .INFO )
72
- except subprocess .CalledProcessError :
73
- raise RuntimeError ("Ruby is not installed. Please install Ruby before continuing." )
64
+ ruby_version = result .stdout .strip ()
65
+ logger .log (f"Ruby version: { ruby_version } " , logging .INFO )
66
+ except subprocess .CalledProcessError as e :
67
+ raise RuntimeError (f"Error checking for Ruby installation: { e .stderr } " )
74
68
except FileNotFoundError :
75
69
raise RuntimeError ("Ruby is not installed. Please install Ruby before continuing." )
76
70
0 commit comments