-
Notifications
You must be signed in to change notification settings - Fork 767
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
vscode resolves paths with ..
in them even if the directory doesn't exist / has invalid name
#2226
Comments
@DetachHead given the folder structure, I think it will work better if you use the
@judej pylance should be able to detect that the folder is invalid and show a message that the path in invalid. |
Yeah that’s what I ended up doing for now (it works without the However that’s not ideal since I intend to commit |
Closing old issue. If this is still a problem, please reopen with the information requested. thanks |
@judej what information was requested that I didn't provide? Also I don't have permission to re-open it |
@DetachHead, sorry about that, seems we closed this incorrectly when cleaning up old issues. |
VS Code version
1.63.2
Extension version
2021.12.1559732655
OS type
Windows
OS version
10
Python distribution
python.org
Python version
3.10
Language server
Default
Expected behaviour
error message because the directories did not exist - it should resolve the path the same way the operating system does:
Actual behaviour
no error, since it resolves to a directory that does exist:
C:\Users\user\basedtyping\
this led to extremely confusing behavior when attempting to link to a typeshed path relative to the python
interpreterPath
:which seems perfectly valid considering my folder structure is:
but instead the log showed this:
because it turns out
python.analysis.typeshedPaths
doesn't resolve${command:python.interpreterPath}
at all for some reason, so it was just treated as a directory called "${command:python.interpreterPath}", even though that's not even a valid directory nameSteps to reproduce
settings.json
, setpython.analysis.typeshedPaths
to a path that doesn't exist:typeshedPath
error:python.analysis.typeshedPaths
to go back up to a directory that does exist by using..
Logs
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: