Closed psarka closed 9 months ago
@psarka I'm sorry for the late response. Thank you for your sponsorship.
I would like to reproduce it, but I don't have conda on this machine and am installing it now. One thing that concerns me is that the conda utility to find the package path that this plugin uses is deprecated to. If you can find a better way to find a conda environment, your problem might be solved.
https://github.com/koxudaxi/ruff-pycharm-plugin/actions/runs/7070462990/job/19247160266#step:11:225
Thanks for finding time to look at this!
I'm guessing my case hits this branch: https://github.com/koxudaxi/ruff-pycharm-plugin/blob/3a02cfcb882cac902ed44eb423519b82e2d01f07/src/com/koxudaxi/ruff/Ruff.kt#L157C1-L159C18
I wonder what does sdk.homeDirectory
resolve to? The paths to ruff in my example environment looks like this:
(test-environment) psarka@xps:~$ which ruff
/home/psarka/miniforge3/envs/test-environment/bin/ruff
If sdk.homeDirectory
resolves to /home/psarka/miniforge3/envs/test-environment/
, then you probably don't need the .parent
there.
@psarka
sdk.homeDirectory
resolves to {pyhton_dir}/bin/python
😅
I will check it in the windows too.
In Windows, it's same result
OK, I understand the platform difference.
{python_dir}/python.exe
{python_dir}/Scripts/ruff.exe
{python_dir}/bin/python
{python_dir}/bin/ruff
@psarka
I released the fixed version as v0.0.28
.
Could you please check it?
Hi, sorry for the lag, yes, it works, thank you! :pray:
Describe the bug ruff executable not found in conda environment on Linux
To Reproduce
mamba create -n ruff ruff
ruff
as local environmentThen
/home/psarka/mambaforge/envs/ruff/bin/ruff
to Project Specific ruff executable does nothing, and disappears when I click OK and reopen plugin settingsExpected behavior ruff to be detected
Screenshots
![image](https://github.com/koxudaxi/ruff-pycharm-plugin/assets/1212244/3fd9f8cd-1dfd-45f8-8a29-01dab57ec500)
Environments (please complete the following information):
Additional context I can set
/home/psarka/mambaforge/envs/ruff/bin/ruff
to Global ruff executable and then it works (phew! I really need it!)