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

Fix for an issue where cargo is not correctly recognised as managed by Nix #80

Merged

Conversation

ivan-jukic
Copy link
Contributor

Which command does not appear to be following symbolic links on *nix systems. This was causing an issue in this particular case where cargo was symlinked from ~/.nix-profile/bin/cargo to its relevant /nix/store location.

The fix addresses this issue by using os.path.realpath function, which can resolve relative and symbolic paths to cannonical paths on the system. In case the path is already a cannonical path, it's simply returned as is, unchanged.

… by `Nix`

---
`which` command does not appear to be following symbolic links on *nix systems. This was causing an issue in this particular case where `cargo` was symlinked from `~/.nix-profile/bin/cargo` to its relevant `/nix/store` location.

The fix addresses this issue by using `os.path.realpath` function, which can resolve relative and symbolic paths to cannonical paths on the system. In case the path is already a cannonical path, it's simply returned as is, unchanged.
@NiklasRosenstein NiklasRosenstein merged commit 94f6e98 into kraken-build:develop Jul 14, 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.

None yet

3 participants