You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: an argument ending in a backslash breaks the command line #100
Hi! We use subprocess.h in llama.cpp to launch MCP servers, and we hit this on Windows.
When an argument contains a space and ends with a backslash, like a folder path such as C:\my dir, the child process receives it merged with everything that comes after it, as one single argument with a stray quote in the middle.
What happens: the argument gets wrapped in quotes because of the space, but the trailing backslash is left alone, so it ends up escaping the closing quote. From the child's point of view the quote never closes.
Screenshot below shows the same call before and after a local fix, on a Windows machine.
I can open a PR with a proposed fix and a test case if you want.
Activity