-
-
Notifications
You must be signed in to change notification settings - Fork 102
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: return err if symlink is not created #259
Conversation
Normally, Can you give the steps to reproduce? And what operating system did you test on?
Sorry for all the trouble. You can see the debug logs without debugging |
I would have tried to reproduce the error again today (with 0.5.0 and 0.5.1). I did not get it again. I don't understand the changed behavior at the moment. Test system is WSL2 with Distro Ubuntu (Host win11), Shell ZSH. Error was when creating the symlink, but without a specific cause. As you advised, I only saw it after using
You have programmed a nice piece of code. And it was very easy to set up and It's fun to play with. But I probably missed a few little things:
These are just suggestions, and more of a retro for me of what I failed at (I'll leave out the fact that I've never programmed lua. :-)). |
Thanks for the suggestions, they're very useful, and I'll take them one by one. ;) |
I would have tried to create a plugin yesterday (https://github.com/anweber/vfox-mani). It was hard because vfox is not always chatty about error. For example, the symlink was not created, but the command
vfox use [email protected]
was completed without error.Apparently, the optional hook
pre_use.lua
is expected to return the current version. Only then will the current folder be created, for which a symlink is generated. The dependencies are not well documented, so I was only able to determine the cause of the error after debugging vfox.This MR now always logs the error and also displays the file name used (
targetDir .. "/current"
). This MR, does not fix the problem, that the firstPATH
variable must always have a subfoldercurrent
. If there is no pre_use hook, this folder may not exist.