Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update windows path separator in executable search #61

Merged

Conversation

cswartzvi
Copy link
Contributor

Using version 0.1.1 on windows, condax install appears to run successfully, however no batch file is created in ~/.local/bin. This issue can be traced to the identification of executables using the conda-meta JSON data. The relative paths listed under the files key are (to the extend of my research) always expressed with forward slashes. This is simple fix to get condax working on windows in anticipation of a more robust check.

conda-meta uses forward slashes to list all installed files (even on windows)
@cswartzvi
Copy link
Contributor Author

cswartzvi commented Nov 17, 2022

Interesting 😮 the debug log from the failed windows test clearly shows the candidate executables extracted from the conda-meta JSON as containing backslashes. However, when I examine the same debug line on my system (using this branch) I see forward slashes. Furthermore, when I install jq (again using this branch) and examine ~/.condx/jq/conda-meta/jq-1.6-haa95532_1.json I also see forward slashes. Not sure what is going on, but regardless, I will write a more robust check that accommodates the variability in windows path separators.

* On windows systems `jq` is actually `jq.bat`
* `shell=True` allows execution of command without extension
@cswartzvi
Copy link
Contributor Author

Alright, so this appears to be working now both on windows systems and in the tests. Apologies for the delay!

@mariusvniekerk mariusvniekerk merged commit fcbb5c6 into mariusvniekerk:main Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants