Skip to content

Use posix paths in devenv's PATH variable#12309

Open
DFOVIT wants to merge 1 commit intomesonbuild:masterfrom
DFOVIT:fix-devenv-path
Open

Use posix paths in devenv's PATH variable#12309
DFOVIT wants to merge 1 commit intomesonbuild:masterfrom
DFOVIT:fix-devenv-path

Conversation

@DFOVIT
Copy link
Contributor

@DFOVIT DFOVIT commented Sep 29, 2023

Currently the devenv dumped for vscode on windows contains windows paths :
PATH="C:\dev\tools\meson\test cases\unit\90 devenv\builddir\;C:\dev\tools\meson\test cases\unit\90 devenv\builddir\subprojects\sub"
which will fail when a directory start with a n for example : c:\this\will\not\work.

When using posix paths, vscode is happy.

  • Before patch :

dump sh/export: PATH="C:\dev\tools\meson\test cases\unit\90 devenv\builddir\;C:\dev\tools\meson\test cases\unit\90 devenv\builddir\subprojects\sub;$PATH"
dump vscode: PATH="C:\dev\tools\meson\test cases\unit\90 devenv\builddir\;C:\dev\tools\meson\test cases\unit\90 devenv\builddir\subprojects\sub"

  • After patch :

dump sh/export: PATH="C:/dev/tools/meson/test cases/unit/90 devenv/builddir;C:\dev\tools\meson\test cases\unit\90 devenv\builddir\subprojects\sub;$PATH"
dump vscode: PATH="C:/dev/tools/meson/test cases/unit/90 devenv/builddir;C:\dev\tools\meson\test cases\unit\90 devenv\builddir\subprojects\sub"

This is a subset that @amyspark kindly agreed to add to #12194

@DFOVIT DFOVIT requested a review from jpakkane as a code owner September 29, 2023 07:39
@xclaesse
Copy link
Member

That's not the only place we have paths, they'll all have to be fixed then... But that sounds like a vscode issue, they should not assume that env file is escaped. Or we could also replace('\\', '\\\\') in the whole file since we already have vscode specific dump format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants