File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,14 @@ def get_workbench_cursor_path(translator=None) -> str:
83
83
base_path = config .get ('WindowsPaths' , 'cursor_path' )
84
84
elif system == "Darwin" :
85
85
base_path = paths_map [system ]["base" ]
86
+ if config .has_section ('MacPaths' ) and config .has_option ('MacPaths' , 'cursor_path' ):
87
+ base_path = config .get ('MacPaths' , 'cursor_path' )
86
88
else : # Linux
87
89
# For Linux, we've already checked all bases in the loop above
88
90
# If we're here, it means none of the bases worked, so we'll use the first one
89
91
base_path = paths_map [system ]["bases" ][0 ]
92
+ if config .has_section ('LinuxPaths' ) and config .has_option ('LinuxPaths' , 'cursor_path' ):
93
+ base_path = config .get ('LinuxPaths' , 'cursor_path' )
90
94
91
95
main_path = os .path .join (base_path , paths_map [system ]["main" ])
92
96
Original file line number Diff line number Diff line change @@ -236,10 +236,14 @@ def get_workbench_cursor_path(translator=None) -> str:
236
236
base_path = config .get ('WindowsPaths' , 'cursor_path' )
237
237
elif system == "Darwin" :
238
238
base_path = paths_map [system ]["base" ]
239
+ if config .has_section ('MacPaths' ) and config .has_option ('MacPaths' , 'cursor_path' ):
240
+ base_path = config .get ('MacPaths' , 'cursor_path' )
239
241
else : # Linux
240
242
# For Linux, we've already checked all bases in the loop above
241
243
# If we're here, it means none of the bases worked, so we'll use the first one
242
244
base_path = paths_map [system ]["bases" ][0 ]
245
+ if config .has_section ('LinuxPaths' ) and config .has_option ('LinuxPaths' , 'cursor_path' ):
246
+ base_path = config .get ('LinuxPaths' , 'cursor_path' )
243
247
244
248
main_path = os .path .join (base_path , paths_map [system ]["main" ])
245
249
Original file line number Diff line number Diff line change @@ -232,9 +232,16 @@ def get_workbench_cursor_path(translator=None) -> str:
232
232
233
233
if system == "Windows" :
234
234
base_path = config .get ('WindowsPaths' , 'cursor_path' )
235
- else :
235
+ elif system == "Darwin" :
236
236
base_path = paths_map [system ]["base" ]
237
- main_path = os .path .join (base_path , paths_map [system ]["main" ])
237
+ if config .has_section ('MacPaths' ) and config .has_option ('MacPaths' , 'cursor_path' ):
238
+ base_path = config .get ('MacPaths' , 'cursor_path' )
239
+ else : # Linux
240
+ # For Linux, we've already checked all bases in the loop above
241
+ # If we're here, it means none of the bases worked, so we'll use the first one
242
+ base_path = paths_map [system ]["bases" ][0 ]
243
+ if config .has_section ('LinuxPaths' ) and config .has_option ('LinuxPaths' , 'cursor_path' ):
244
+ base_path = config .get ('LinuxPaths' , 'cursor_path' )
238
245
239
246
if not os .path .exists (main_path ):
240
247
raise OSError (translator .get ('reset.file_not_found' , path = main_path ) if translator else f"未找到 Cursor main.js 文件: { main_path } " )
You can’t perform that action at this time.
0 commit comments