purcell / exec-path-from-shell

Make Emacs use the $PATH set up by the user's shell
Other
1.41k stars 81 forks source link

Incompatibility with dash? #80

Closed rgrinberg closed 6 years ago

rgrinberg commented 6 years ago

I suddenly get the following error on startup:

Debugger entered--Lisp error: (error "Expected printf output from shell, but got: \"/usr/local/bin/dash: 0: can't access tty; job control turned off\n__RESULT\\\\000\\\\/usr\\\\/local\\\\/bin\\\\:\\\\/usr\\\\/bin\\\\:\\\\/bin\\\\:\\\\/usr\\\\/sbin\\\\:\\\\/sbin\\\\:\\\\/Library\\\\/TeX\\\\/texbin\\\\:\\\\/opt\\\\/X11\\\\/bin\\\\:\\\\/Users\\\\/rgrinberg\\\\/.local\\\\/bin\\\\:\\\\/Users\\\\/rgrinberg\\\\/reps\\\\/dotfiles\\\\:\\\\/Users\\\\/rgrinberg\\\\/.opam\\\\/4.06.1\\\\/bin\\\\:\\\\/usr\\\\/local\\\\/Cellar\\\\/zplug\\\\/2.4.2\\\\/bin\\\\:\\\\/usr\\\\/local\\\\/opt\\\\/zplug\\\\/bin\\\\:\\\\/Applications\\\\/Visual\\\\:Studio\\\\:Code.app\\\\/Contents\\\\/Resources\\\\/app\\\\/bin\\\\:\\\\/Users\\\\/rgrinberg\\\\/q\\\\/l32\\\\:\\\\/Applications\\\\/Emacs.app\\\\/Contents\\\\/MacOS\\\\/bin\\\\-x86_64\\\\-10_9\\\\:\\\\/Applications\\\\/Emacs.app\\\\/Contents\\\\/MacOS\\\\/libexec\\\\-x86_64\\\\-10_9\\\\000\\\\/usr\\\\/share\\\\/man\\\\:\\\\/usr\\\\/local\\\\/share\\\\/man\\\\:\\\\/Library\\\\/TeX\\\\/Distributions\\\\/.DefaultTeX\\\\/Contents\\\\/Man\\\\:\\\\/opt\\\\/X11\\\\/share\\\\/man\\\\:\\\\/Users\\\\/rgrinberg\\\\/.opam\\\\/4.06.1\\\\/man\\\\000__RESULT\"")
  signal(error ("Expected printf output from shell, but got: \"/usr/local/bin/dash: 0: can't access tty; job control turned off\n__RESULT\\\\000\\\\/usr\\\\/local\\\\/bin\\\\:\\\\/usr\\\\/bin\\\\:\\\\/bin\\\\:\\\\/usr\\\\/sbin\\\\:\\\\/sbin\\\\:\\\\/Library\\\\/TeX\\\\/texbin\\\\:\\\\/opt\\\\/X11\\\\/bin\\\\:\\\\/Users\\\\/rgrinberg\\\\/.local\\\\/bin\\\\:\\\\/Users\\\\/rgrinberg\\\\/reps\\\\/dotfiles\\\\:\\\\/Users\\\\/rgrinberg\\\\/.opam\\\\/4.06.1\\\\/bin\\\\:\\\\/usr\\\\/local\\\\/Cellar\\\\/zplug\\\\/2.4.2\\\\/bin\\\\:\\\\/usr\\\\/local\\\\/opt\\\\/zplug\\\\/bin\\\\:\\\\/Applications\\\\/Visual\\\\:Studio\\\\:Code.app\\\\/Contents\\\\/Resources\\\\/app\\\\/bin\\\\:\\\\/Users\\\\/rgrinberg\\\\/q\\\\/l32\\\\:\\\\/Applications\\\\/Emacs.app\\\\/Contents\\\\/MacOS\\\\/bin\\\\-x86_64\\\\-10_9\\\\:\\\\/Applications\\\\/Emacs.app\\\\/Contents\\\\/MacOS\\\\/libexec\\\\-x86_64\\\\-10_9\\\\000\\\\/usr\\\\/share\\\\/man\\\\:\\\\/usr\\\\/local\\\\/share\\\\/man\\\\:\\\\/Library\\\\/TeX\\\\/Distributions\\\\/.DefaultTeX\\\\/Contents\\\\/Man\\\\:\\\\/opt\\\\/X11\\\\/share\\\\/man\\\\:\\\\/Users\\\\/rgrinberg\\\\/.opam\\\\/4.06.1\\\\/man\\\\000__RESULT\""))
  error("Expected printf output from shell, but got: %S" "/usr/local/bin/dash: 0: can't access tty; job control turned off\n__RESULT\\000\\/usr\\/local\\/bin\\:\\/usr\\/bin\\:\\/bin\\:\\/usr\\/sbin\\:\\/sbin\\:\\/Library\\/TeX\\/texbin\\:\\/opt\\/X11\\/bin\\:\\/Users\\/rgrinberg\\/.local\\/bin\\:\\/Users\\/rgrinberg\\/reps\\/dotfiles\\:\\/Users\\/rgrinberg\\/.opam\\/4.06.1\\/bin\\:\\/usr\\/local\\/Cellar\\/zplug\\/2.4.2\\/bin\\:\\/usr\\/local\\/opt\\/zplug\\/bin\\:\\/Applications\\/Visual\\:Studio\\:Code.app\\/Contents\\/Resources\\/app\\/bin\\:\\/Users\\/rgrinberg\\/q\\/l32\\:\\/Applications\\/Emacs.app\\/Contents\\/MacOS\\/bin\\-x86_64\\-10_9\\:\\/Applications\\/Emacs.app\\/Contents\\/MacOS\\/libexec\\-x86_64\\-10_9\\000\\/usr\\/share\\/man\\:\\/usr\\/local\\/share\\/man\\:\\/Library\\/TeX\\/Distributions\\/.DefaultTeX\\/Contents\\/Man\\:\\/opt\\/X11\\/share\\/man\\:\\/Users\\/rgrinberg\\/.opam\\/4.06.1\\/man\\000__RESULT")
  exec-path-from-shell-printf("%s\\000%s" ("${PATH-f28a295b5966978bae27e091ae5d1cd4}" "${MANPATH-f28a295b5966978bae27e091ae5d1cd4}"))
  exec-path-from-shell-getenvs(("PATH" "MANPATH"))
  exec-path-from-shell-copy-envs(("PATH" "MANPATH"))
  exec-path-from-shell-initialize()
  spacemacs-bootstrap/init-exec-path-from-shell()
purcell commented 6 years ago

Thanks for the report. By "suddenly", do you mean that you think the behaviour of exec-path-from-shell changed, or that you've suddenly switched your shell to dash, and now see this error?

rgrinberg commented 6 years ago

I've updated my packages and this is the new behavior I observe. I've had dash has my shell for a long time now. Switching to zsh/bash makes the problem go away btw.

purcell commented 6 years ago

Hmm. Nothing of note has really changed in the code for a year or so, since 5736cc87e47052bf1bacd9ce5807e5cf3a2c6a71. Was your previous version newer or older than that one?

rgrinberg commented 6 years ago

Steve Purcell notifications@github.com writes:

Hmm. Nothing of note has really changed in the code for a year or so, since 5736cc87e47052bf1bacd9ce5807e5cf3a2c6a71. Was your previous version newer or older than that one?

Hmm, then it must be the fault of my shell or some other package. Thanks for the pointer. I suppose this can be closed...

purcell commented 6 years ago

If you enable exec-path-from-shell-debug, you can see which exact command is getting run, and what its output is, so that might make it easier to track down the problem. But yes, I'll close this issue in the meantime: feel free to re-open it if necessary.