Skip to content
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

Building package in a path with space charater fail on Windows #25

Open
sapetnioc opened this issue Nov 21, 2024 · 3 comments
Open

Building package in a path with space charater fail on Windows #25

sapetnioc opened this issue Nov 21, 2024 · 3 comments

Comments

@sapetnioc
Copy link
Contributor

I do not know if it is specific to Windows. I had the problem with libminc. It might be either a bug in rattler-build or a problem in escaping command parameters when calling rattler-build from Python.

@nsouedet
Copy link
Collaborator

The problem is probably around these lines :
https://github.com/neurospin/neuro-forge/blob/89dc17362c56c53eddac0b3cd91aaaa1ce143230/neuro_forge/soma_forge/commands/apply_plan.py#L85C1-L103C39

I think that it is a problem with rattler-build command call. Maybe this could help

@sapetnioc
Copy link
Contributor Author

I am still hoping that it is not a problem here because I have no special character, just a space in C:\Users\FirstName LastName, and I believe it it the job of subprocess to correctly escape the command. But I will try another example with python instead of rattler-build to find out who is messing with my command.

@sapetnioc
Copy link
Contributor Author

I believe the problem comes from rattler-build and is Windows specific because the following command fail (in PowerShell):

 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 is working:

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

To activate the environment, rattler-build generates a script and use call on it without appropriate escaping:

 │ ╭─ 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
 │ │ )

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

No branches or pull requests

2 participants