Closed Abdallatif closed 3 months ago
Thanks for the report!
Once again, it's a bug in VSCode (or a combination of bugs) that doesn't affect VScode in the way it's used but does impact monaco-vscode-api
Explanation:
process.env.HOME || process.env.HOMEPATH || ''
but process.env is polyfilld in web mode by the webpack build and replaced by an empty objectSo, in the demo, the user home directory is detected by VSCode as /tmp
while it's detected as /
by the search result extension
It works in VSCode.dev because there is no way to start with a local open folder (you can only open it later)
So a workaround can be to do the same as in vscode.dev: create an empty workspace THEN add your folder in it when the services are initialized
https://github.com/CodinGame/monaco-vscode-api/pull/373 will allow to manually configure user home directory, setting it to anything else (/
is fine) will workaround your issue
Awesome, thanks a lot for fixing this 🙏 I'll close the issue since it's fixed now.
When using the
@codingame/monaco-vscode-search-result-default-extension
and open search results in editor, then hover over a file name and click on the follow linkThe following error appears:
In the console, it shows the following error:
I tried to do some debugging and find the core issue, my guess here is that the
~
is being ignored while it should be converted to the workspace uri.I also found (by manually changing the editor search results) that if we remove the
~/
from the file path, vscode would be able to locate the file correctly.