![]() ![]() That's understandable, I'll close this issue then. How is this function not throwing an error in this case? If some kind of normalization is happening beforehand, then why isn't it already an absolute path? There are 6 package repositories, the 'classical' ones msys2, mingw32, and mingw64 and the newer ucrt64, clang32, and clang64. The returned list should be empty, and yet we throw an error if the returned list is empty. Now if I cd foo, that doesn't match the first two conditions either. Otherwise, we loop through CDPATH, and for each element we add a path to the returned list.įor the purpose of simplicity, let's assume that my CDPATH is empty., we normalize it and add it to the returned list. If the path starts with /, we add it to the returned list.The path_apply_cdpath function returns a list of paths. ![]() I'm actually a bit confused at the logic there, tbh. I don't know what exactly would be involved in fixing that, and tbh I'm not enthused about the idea of adding code here that isn't just specific to windows (which we do not natively support) but specific to some windows compatibility layers when WSL seems to be the way forward and doesn't have this problem (AFAIK - pretty sure they use /mnt/c instead of C:\). ![]() And C:\ is an absolute path, but only on specific windows-y systems. 764 1 1 gold badge 7 7 silver badges 13 13 bronze badges. The issue here is, fundamentally, that fish wants an absolute directory for $PWD, so it can do path computations on it. How do I properly integrate MSYS2 shell into my vscode bash shell visual-studio-code msys2 Share. Ideally, this code would only run on Windows builds if possible.Īdding special code that only runs on minority platforms isn't a great idea and should be avoided if at all possible. When I create a shortcut to msys64.exe with /usr/bin/zsh it doesnt pick up that Im trying to use a different shell - and instead launches with the sh wrapper. I had it previously, but my PC was wiped and cant work out how I did it. C:\ is a perfectly allowable unix directory name. Sorry if this is really simple - I cant work out with the launcher how to set my default shell. That's the ambiguity I complained about above. So if you are in /tmp, it will attempt to cd to /tmp/C:\, which fails because that doesn't exist. The error you are getting is this one, when attempting to cd to all possible $CDPATH components has failed.īecause what happens is that path_apply_cdpath absolutizes the directory, and, like I said, assumes C:\ refers to a directory called C:\ inside one of the directories in $CDPATH. (not sure that error is reachable anymore, tbh) It's a string operation, not a file operation. That's not the error you're getting, because this doesn't ever check if a directory exists, it only applies $CDPATH. If no directory is found, it throws an error here. It introduces problems if something happens between the check and the actual usage. I think an extra condition needs to be added to end of this function that does a filesystem check to see if the directory exists ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |