rattler-build icon indicating copy to clipboard operation
rattler-build copied to clipboard

On Windows, --output-dir does not work if path contains a space

Open sapetnioc opened this issue 1 year ago • 0 comments

I installed rattler-build 0.31.0 via Pixi. I used the recipe located here

In PowerShell, the following command fail:

 rattler-build.exe build -r 'C:\Users\Me Myself\dev\neuro-forge\recipes\libminc' --output-dir 'C:\Users\Me Myself\dev\output'

But the following one is working:

rattler-build.exe build -r 'C:\Users\Me Myself\dev\neuro-forge\recipes\libminc' --output-dir 'C:\Users\me\dev\output'

Looking at the output, I suspect that rattler-build generates a build_env.bat script and use call on it without appropriate quotes:

 │ ╭─ Running build script
 │ │ %SRC_DIR%>IF "" == "" (
 │ │ 'C:\Users\Me' n’est pas reconnu en tant que commande interne
 │ │ ou externe, un programme exécutable ou un fichier de commandes.
 │ │
 │ │  call %SRC_DIR%\build_env.bat
 │ │ )

The french sentence says that C:\Users\Me is not recognized as an executable. Probably %SRC_DIR%\build_env.bat is interpreted as "C:\Users\Me" "Myself\dev\output\...\build_env.bat" instead of "C:\Users\Me Myself\dev\output\...\build_env.bat". But I am not familiar at all with Windows.

sapetnioc avatar Nov 21 '24 17:11 sapetnioc