Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improper handling of shell paths with spaces #113

Open
8bitter opened this issue Mar 20, 2023 · 1 comment
Open

Improper handling of shell paths with spaces #113

8bitter opened this issue Mar 20, 2023 · 1 comment

Comments

@8bitter
Copy link

8bitter commented Mar 20, 2023

This happens on Windows, but I suspect it would happen on any platform with a space in the path.

Error from Emacs 28.2:

Error (use-package): exec-path-from-shell/:init: Non-zero exit code from shell C:\Program Files\Git\usr\bin\bash.exe invoked with args ("-l" "-i" "-c" "c:/Program Files/Git/usr/bin/printf.exe '__RESULT\\000%s\\000%s\\000__RESULT' \"${PATH-d932e0941975cd140d6dd7a8f88c8420}\" \"${MANPATH-d932e0941975cd140d6dd7a8f88c8420}\"").  Output was:
"bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash: c:/Program: No such file or directory

Command prompt 'where' command:

C:\>where bash
C:\Windows\System32\bash.exe
C:\Program Files\Git\usr\bin\bash.exe
@purcell
Copy link
Owner

purcell commented Mar 21, 2023

Actually, it would not happen on other platforms. The path of the shell is passed as a distinct argument to call-process, so on most platforms it can safely include spaces. I seem to recall (from other packages) that certain combinations of windows and bash exhibit this issue, though — it's the first time I've seen it reported here. It might depend on the type of installation of bash, but I can't really advise how best to address it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants