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

Drom doesn't work on windows with opam 2.2 #230

Open
Ninjapouet opened this issue Jul 25, 2024 · 3 comments
Open

Drom doesn't work on windows with opam 2.2 #230

Ninjapouet opened this issue Jul 25, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Ninjapouet
Copy link

AFAIU, with opam 2.2 comes new installation procedure that installs opam in a Windows path (within %APPDATA%). However, drom looks for opam in a traditionnal way in $(HOME)/.opam directory. As it doesn't find opam, it systematically tries to opam init at each call... Looking for hardcoded directories is too fragile and should be avoided.

This is related to #227

@Ninjapouet Ninjapouet added the bug Something isn't working label Jul 25, 2024
@Ninjapouet
Copy link
Author

Setting explicitly OPAMROOT is a possible workaround.

Ninjapouet pushed a commit to Ninjapouet/drom that referenced this issue Jul 25, 2024
@zapashcanon
Copy link
Member

Using directories (which IIRC is already a dependency of drom) should allow to properly locate the place where opam is thanks to SHGetKnownFolderPath.

@Ninjapouet
Copy link
Author

Thanks for explaining that drom should work but it does not. Like I said, using opam 2.2 installed on Windows and with MSYS2 backend leads to drom compiled in MSYS2 continue searching for Linux paths and not Windows' (although Sys.os_type gives "Win32" on MSYS2).

lefessan added a commit that referenced this issue Sep 9, 2024
Fixes #230: compute the `opam` root using `opam` itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants