-
Notifications
You must be signed in to change notification settings - Fork 63
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
error: the path link '/home/sanxiyn/download/zig' is not in PATH #65
Comments
What's the behavior you'd expect or like in this case? |
The behavior I want is to behave as if This probably can be implemented by searching PATH for zigup like |
There are actually use cases for not wanting the resulting |
I ran |
You know what, looking at the code a bit more, it looks like zigup actually does make an effort to ensure that when you set the default compiler it is actually in Your idea to detect when zigup does not live in a valid directory PATH but has been symlinked from a valid directory is an interesting one. My hesitation is do we need to add this complexity to zigup? The current solution in this case would be to copy zigup to the bin directory. Adding support for zigup to be symlinked from another directory adds some complexity/overhead. here is the current algorithm to the determine the path link directory: Lines 120 to 127 in 9f8c5f9
With your suggestion, this function would need to always traverse every directory in
Is there an environment or a reason why you wouldn't be able to move zigup to a directory in |
I think improving the error message would be fine. I actually solved this for myself just as you suggested, by copying (instead of symlinking) zigup to bin directory. But it was mystifying at first why it failed, and it was unclear the solution is to copy. There is no particular reason I symlink, it's just that I always did it that way for like a decade and it worked fine. In download directory, I keep metadata (like where and when I downloaded it), and those don't belong in bin directory, and copying seemed wasteful of space, so I symlinked. |
To reproduce, download zigup to $HOME/download/zigup, and symbolic link it to $HOME/bin/zigup, whereas $HOME/download is not in PATH and $HOME/bin is.
When zigup is executed, /proc/self/exe points to $HOME/download/zigup and not $HOME/bin/zigup, even if $HOME/bin/zigup was what was found in PATH, because kernel already resolved symbolic link.
The text was updated successfully, but these errors were encountered: