PATH is broken in the env file, various error messages are in there too.
generated env file
# -*- mode: dotenv -*-
# ---------------------------------------------------------------------------
# This file was auto-generated by Doom by running:
#
# /usr/local/bin/fish -lc /usr/bin/env
# /usr/local/bin/fish -ic /usr/bin/env
#
# It contains all environment variables scraped from your default shell
# (excluding variables blacklisted in doom-env-ignored-vars).
#
# It is NOT safe to edit this file. Changes will be overwritten next time
# that `doom env refresh` is executed. Alternatively, create your own env file
# in your DOOMDIR and load that with `(load-env-vars FILE)`.
#
# To auto-regenerate this file when `doom reload` is run, use `doom env enable'
# or set DOOMENV=1 in your shell environment/config.
# ---------------------------------------------------------------------------
<W> fish: Could not send job 5 ('echo "begin; $argv "\n" ;end <&3 3<&-" | source 3<&0') with pgid 29908 to foreground
ANDROID_HOME=/Users/strayer/Library/Android/sdk
ANSIBLE_NOCOWS=1
ASDF_DIR=/Users/strayer/.asdf
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.MRsn1QnVEd/Render
COLORFGBG=15;0
COLORTERM=truecolor
DISPLAY=/private/tmp/com.apple.launchd.58Mzlmp6JV/org.macosforge.xquartz:0
EDITOR=nvim
FINGERS_COMPACT_HINTS=1
FINGERS_COPY_COMMAND=/Users/strayer/.bin/tmux-yank.sh
FINGERS_COPY_COMMAND_UPPERCASE=
FINGERS_HIGHLIGHT_FORMAT=[33m[m[33m%s[m
FINGERS_HIGHLIGHT_FORMAT_NOCOLOR=%s
FINGERS_HIGHLIGHT_FORMAT_NOCOMPACT=[33m[m[33m%s[m
FINGERS_HIGHLIGHT_FORMAT_NOCOMPACT_NOCOLOR=%s
FINGERS_HINT_FORMAT=[33m[1m%s[m
FINGERS_HINT_FORMAT_NOCOLOR=%s
FINGERS_HINT_FORMAT_NOCOMPACT=[33m[1m[%s][m
FINGERS_HINT_FORMAT_NOCOMPACT_NOCOLOR=[%s]
FINGERS_HINT_POSITION=left
FINGERS_HINT_POSITION_NOCOMPACT=right
FINGERS_PATTERNS=((^|^\.|[[:space:]]|[[:space:]]\.|[[:space:]]\.\.|^\.\.)[[:alnum:]~_-]*/[][[:alnum:]_.#$%&+=/@-]+)|([[:digit:]]{4,})|([0-9a-f]{7,40})|((https?://|git@|git://|ssh://|ftp://|file:///)[[:alnum:]?=%/_.:,;~@!#$&()*+-]*)|([[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3})|0x([0-9a-f]+)|(deployment.app|binding|componentstatuse|configmap|endpoint|event|limitrange|namespace|node|persistentvolumeclaim|persistentvolume|pod|podtemplate|replicationcontroller|resourcequota|secret|serviceaccount|service|mutatingwebhookconfiguration.admissionregistration.k8s.io|validatingwebhookconfiguration.admissionregistration.k8s.io|customresourcedefinition.apiextension.k8s.io|apiservice.apiregistration.k8s.io|controllerrevision.apps|daemonset.apps|deployment.apps|replicaset.apps|statefulset.apps|tokenreview.authentication.k8s.io|localsubjectaccessreview.authorization.k8s.io|selfsubjectaccessreviews.authorization.k8s.io|selfsubjectrulesreview.authorization.k8s.io|subjectaccessreview.authorization.k8s.io|horizontalpodautoscaler.autoscaling|cronjob.batch|job.batch|certificatesigningrequest.certificates.k8s.io|events.events.k8s.io|daemonset.extensions|deployment.extensions|ingress.extensions|networkpolicies.extensions|podsecuritypolicies.extensions|replicaset.extensions|networkpolicie.networking.k8s.io|poddisruptionbudget.policy|clusterrolebinding.rbac.authorization.k8s.io|clusterrole.rbac.authorization.k8s.io|rolebinding.rbac.authorization.k8s.io|role.rbac.authorization.k8s.io|storageclasse.storage.k8s.io)[[:alnum:]_#$%&+=/@-]+
FZF_DEFAULT_OPTS=--tiebreak=index --bind=ctrl-r:toggle-sort +m
HOME=/Users/strayer
HOMEBREW_GITHUB_API_TOKEN=<redacted>
HOMEBREW_INSTALL_CLEANUP=1
HOMEBREW_NO_ANALYTICS=1
HOMEBREW_NO_AUTO_UPDATE=1
ITERM_PROFILE=Dark
ITERM_SESSION_ID=w0t0p0:6903E4E7-9088-416F-9599-50AC1C8F14E2
LANG=de_DE.UTF-8
LC_TERMINAL=iTerm2
LC_TERMINAL_VERSION=3.3.0beta2
LOGNAME=strayer
LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD
LS_COLORS=no=00:fi=00:di=36:ln=35:pi=30;44:so=35;44:do=35;44:bd=33;44:cd=37;44:or=05;37;41:mi=05;37;41:ex=01;31:*.cmd=01;31:*.exe=01;31:*.com=01;31:*.bat=01;31:*.reg=01;31:*.app=01;31:*.txt=32:*.org=32:*.md=32:*.mkd=32:*.h=32:*.hpp=32:*.c=32:*.C=32:*.cc=32:*.cpp=32:*.cxx=32:*.objc=32:*.cl=32:*.sh=32:*.bash=32:*.csh=32:*.zsh=32:*.el=32:*.vim=32:*.java=32:*.pl=32:*.pm=32:*.py=32:*.rb=32:*.hs=32:*.php=32:*.htm=32:*.html=32:*.shtml=32:*.erb=32:*.haml=32:*.xml=32:*.rdf=32:*.css=32:*.sass=32:*.scss=32:*.less=32:*.js=32:*.coffee=32:*.man=32:*.0=32:*.1=32:*.2=32:*.3=32:*.4=32:*.5=32:*.6=32:*.7=32:*.8=32:*.9=32:*.l=32:*.n=32:*.p=32:*.pod=32:*.tex=32:*.go=32:*.sql=32:*.csv=32:*.sv=32:*.svh=32:*.v=32:*.vh=32:*.vhd=32:*.bmp=33:*.cgm=33:*.dl=33:*.dvi=33:*.emf=33:*.eps=33:*.gif=33:*.jpeg=33:*.jpg=33:*.JPG=33:*.mng=33:*.pbm=33:*.pcx=33:*.pdf=33:*.pgm=33:*.png=33:*.PNG=33:*.ppm=33:*.pps=33:*.ppsx=33:*.ps=33:*.svg=33:*.svgz=33:*.tga=33:*.tif=33:*.tiff=33:*.xbm=33:*.xcf=33:*.xpm=33:*.xwd=33:*.xwd=33:*.yuv=33:*.aac=33:*.au=33:*.flac=33:*.m4a=33:*.mid=33:*.midi=33:*.mka=33:*.mp3=33:*.mpa=33:*.mpeg=33:*.mpg=33:*.ogg=33:*.opus=33:*.ra=33:*.wav=33:*.anx=33:*.asf=33:*.avi=33:*.axv=33:*.flc=33:*.fli=33:*.flv=33:*.gl=33:*.m2v=33:*.m4v=33:*.mkv=33:*.mov=33:*.MOV=33:*.mp4=33:*.mp4v=33:*.mpeg=33:*.mpg=33:*.nuv=33:*.ogm=33:*.ogv=33:*.ogx=33:*.qt=33:*.rm=33:*.rmvb=33:*.swf=33:*.vob=33:*.webm=33:*.wmv=33:*.doc=31:*.docx=31:*.rtf=31:*.odt=31:*.dot=31:*.dotx=31:*.ott=31:*.xls=31:*.xlsx=31:*.ods=31:*.ots=31:*.ppt=31:*.pptx=31:*.odp=31:*.otp=31:*.fla=31:*.psd=31:*.7z=1;35:*.apk=1;35:*.arj=1;35:*.bin=1;35:*.bz=1;35:*.bz2=1;35:*.cab=1;35:*.deb=1;35:*.dmg=1;35:*.gem=1;35:*.gz=1;35:*.iso=1;35:*.jar=1;35:*.msi=1;35:*.rar=1;35:*.rpm=1;35:*.tar=1;35:*.tbz=1;35:*.tbz2=1;35:*.tgz=1;35:*.tx=1;35:*.war=1;35:*.xpi=1;35:*.xz=1;35:*.z=1;35:*.Z=1;35:*.zip=1;35:*.ANSI-30-black=30:*.ANSI-01;30-brblack=01;30:*.ANSI-31-red=31:*.ANSI-01;31-brred=01;31:*.ANSI-32-green=32:*.ANSI-01;32-brgreen=01;32:*.ANSI-33-yellow=33:*.ANSI-01;33-bryellow=01;33:*.ANSI-34-blue=34:*.ANSI-01;34-brblue=01;34:*.ANSI-35-magenta=35:*.ANSI-01;35-brmagenta=01;35:*.ANSI-36-cyan=36:*.ANSI-01;36-brcyan=01;36:*.ANSI-37-white=37:*.ANSI-01;37-brwhite=01;37:*.log=01;32:*~=01;32:*#=01;32:*.bak=01;36:*.BAK=01;36:*.old=01;36:*.OLD=01;36:*.org_archive=01;36:*.off=01;36:*.OFF=01;36:*.dist=01;36:*.DIST=01;36:*.orig=01;36:*.ORIG=01;36:*.swp=01;36:*.swo=01;36:*,v=01;36:*.gpg=34:*.gpg=34:*.pgp=34:*.asc=34:*.3des=34:*.aes=34:*.enc=34:*.sqlite=34:
PATH=/Users/strayer/.poetry/bin:/Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims:/Users/strayer/.asdf/bin:/Users/strayer/.asdf/shims:/Users/strayer/.bin:/usr/local/sbin:/Users/strayer/Library/Android/sdk/tools:/Users/strayer/Library/Android/sdk/platform-tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:.:/Applications/Wireshark.app/Contents/MacOS:/usr/local/Cellar/pyenv-virtualenv/1.1.3/shims:/Users/strayer/.pyenv/shims:/Users/strayer/.poetry/bin:/Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims:/Users/strayer/.bin:/usr/local/sbin:/Users/strayer/Library/Android/sdk/tools:/Users/strayer/Library/Android/sdk/platform-tools:.:/Users/strayer/.asdf/bin /Users/strayer/.asdf/shims
PATH=/usr/local/Cellar/pyenv-virtualenv/1.1.3/shims:/Users/strayer/.pyenv/shims:/Users/strayer/.poetry/bin:/Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims:/Users/strayer/.asdf/bin:/Users/strayer/.asdf/shims:/Users/strayer/.bin:/usr/local/sbin:/Users/strayer/Library/Android/sdk/tools:/Users/strayer/Library/Android/sdk/platform-tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:.:/Applications/Wireshark.app/Contents/MacOS:/usr/local/Cellar/pyenv-virtualenv/1.1.3/shims:/Users/strayer/.pyenv/shims:/Users/strayer/.poetry/bin:/Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims:/Users/strayer/.bin:/usr/local/sbin:/Users/strayer/Library/Android/sdk/tools:/Users/strayer/Library/Android/sdk/platform-tools:.:/Users/strayer/.asdf/bin /Users/strayer/.asdf/shims
PWD=/Users/strayer/.emacs.d
PYENV_SHELL=fish
PYENV_VIRTUALENV_INIT=1
SHELL=/usr/local/bin/fish
SHLVL=3
TERM=screen-256color
TERM_PROGRAM=iTerm.app
TERM_PROGRAM_VERSION=3.3.0beta2
TERM_SESSION_ID=w0t0p0:6903E4E7-9088-416F-9599-50AC1C8F14E2
TMPDIR=/var/folders/cd/g29f_55n1q3gc_d49bjxynj40000gn/T/
TMUX=/private/tmp/tmux-501/default,19256,0
TMUX_PANE=%1
TMUX_PLUGIN_MANAGER_PATH=/Users/strayer/.tmux/plugins/
USER=strayer
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
_ZL_DATA=/Users/strayer/.local/share/zlua/zlua.txt
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x3
fish_user_paths=/Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims
tcsetpgrp: Inappropriate ioctl for device
I'm a little confused by having two PATH envs in there, especially because their contents differ. The actual PATH of my shell looks like this (note that fish doesn't separate entries in a list env by : but by ):
# echo $PATH
/usr/local/Cellar/pyenv-virtualenv/1.1.3/shims /Users/strayer/.pyenv/shims /Users/strayer/.poetry/bin /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.bin /usr/local/sbin /Users/strayer/Library/Android/sdk/tools /Users/strayer/Library/Android/sdk/platform-tools /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/X11/bin /Applications/VMware Fusion.app/Contents/Public /Library/TeX/texbin . /Applications/Wireshark.app/Contents/MacOS /Users/strayer/.poetry/bin /Users/strayer/.asdf/bin /Users/strayer/.asdf/shims /Users/strayer/.bin /usr/local/sbin /Users/strayer/Library/Android/sdk/tools /Users/strayer/Library/Android/sdk/platform-tools . /usr/local/Cellar/pyenv-virtualenv/1.1.3/shims /Users/strayer/.pyenv/shims
Correctly generated env vars like PATH, no error messages inside the env file.
doom env refresh and inspect the env file contents
Click to expand
Doom Doctor
Emacs v26.1
Doom v2.0.9 (3c01de88)
shell: /usr/local/bin/fish
Compiled with:
JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
MODULES THREADS LCMS2
uname -a:
Darwin wolf359 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT
2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64
Checking your OS...
Checking your fonts...
Checking gnutls/openssl...
Testing your root certificates...
make: *** [doctor] Error 255
Note: Not sure why make doctor errors out… doom/info inside emacs fails because the PATH variable is not correctly set up and it can't find git.
It runs these two commands at the top of the file to collect your shell environment:
/usr/local/bin/fish -lc /usr/bin/env
/usr/local/bin/fish -ic /usr/bin/env
One invokes a login shell, the other invokes an interactive shell. Try running them yourself and see if they produce errors. If they do, I'm inclined to suspect your shell config, as a vanilla fish config does not produce those errors.
note that fish doesn't separate entries in a list env by : but by
Is there a way to get it to use one delimiter, consistently? Or to test which of the two formats it will use? Because I can't reproduce it, running env -i HOME="$HOME" fish -ic env (to ensure it runs with no environment at all). It produces the following PATH on Arch Linux:
PATH=/usr/bin:/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
This would imply it accepts : as a delimiter as well. If there is no consistency in how fish's PATH is structured, then I'm not sure I can reasonably support fish.
I'll investigate, thanks for the detailed writeup!
Well, to my shame, I have to admit that I can't reproduce this behavior anymore. I investigated two issues with my PATH that don't relate to doom and fixed them, now the PATH in dooms env file isn't duplicated anymore and consistently uses : to separate the entries.
What I did was:
set -gx PATH ... $PATH calls in my fish config to set -x fish_user_paths ... $fish_user_pathsI still have two error lines in the env file:
<W> fish: Could not send job 5 ('echo "begin; $argv "\n" ;end <&3 3<&-" | source 3<&0') with pgid 40848 to foreground
tcsetpgrp: Inappropriate ioctl for device
They don't appear when running the mentioned fish commands in a shell manually, so I assume it has something to do with how emacs executes the commands. They apparently don't cause any problems, so its not that big of a deal.
Sorry for the noise, I'd love to find out how the original issue happened, but I just can't reproduce it anymore.
That's perfectly alright! I'd rather these things be brought to my attention -- there's more to learn from that!
They don't appear when running the mentioned fish commands in a shell manually, so I assume it has something to do with how emacs executes the commands. They apparently don't cause any problems, so its not that big of a deal.
That is very possible. Could you try running those two fish commands through M-x shell-command and see if they produce an error?
Not sure if my issue is related (I'm using fish), so I'll comment here first.
When I generate an env from doom, doom ends up not being able to find a lot of things. The following is taken from the messages buffer after starting up emacs.
Doom loaded 265 packages across 47 modules in 2.880s
Error running timer ‘mac-setup-help-topics’: (error "Uncompression program ‘sh’ not found")
Cannot find ‘gls‘ (GNU ls). Install coreutils via your system package manager
Note that I'm using a mac, and chemacs (and nonstandard doom repo and config paths)
@hlissner , sorry for not coming back on this. I just discovered another issue I have with PATH and doom env. My PATH contains a path with a space in it (see original comment: /Applications/VMware Fusion.app/Contents/Public)
Emacs exec-path seems to break when this is in the env file:
PATH=/Users/work/.bin:/usr/local/sbin:/Users/work/Library/Android/sdk/tools:/Users/work/Library/Android/sdk/platform-tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/Applications/Wireshark.app/Contents/MacOS:/Users/work/Library/Python/3.7/bin:/Users/work/.asdf/shims:/Users/work/.asdf/bin
exec-path: ("/Users/work/.bin" "/usr/local/sbin" "/Users/work/Library/Android/sdk/tools" "/Users/work/Library/Android/sdk/platform-tools" "/usr/local/bin" "/usr/bin" "/bin" "/usr/sbin" "/sbin" "/opt/X11/bin" "/Applications/VMware" "/usr/local/Cellar/emacs-plus/26.2/libexec/emacs/26.2/x86_64-apple-darwin18.2.0/")
See "/Applications/VMware" in exec-path – this causes all following PATH entries to be ignored, apparently.
it happens to my setup also. I am using zsh. I found the issue when I tried to format the Haskell code on save. doom emacs says that you might need to install brittany. But I have installed it and can find the command out of the doom emacs. But in the terminal inside the emacs, it could not be found.
Update:
Just found that this article helped to resolve my issue. (https://kb.vmware.com/s/article/53542)
Rename the VMware Fusion in /Applications folder to remove the space. and run doom env refresh.
@Strayer This appears to be a bug in the load-env-vars package. The regexp (in load-env-vars-env-var-regexp) that it uses to scan the envvar file doesn't accommodate spaces in unquoted values. It may be better to report this there.
I'll see if I can figure out a solution for Doom in the meantime.
@hlissner the maintainer of load-env-vars mentions that the PATH variable should be wrapped in spaces in this case, which does sound correct, in my opinion. Maybe doom can implicitly add quotes around the values of the env vars returned by /usr/bin/env?
We're using /usr/bin/env to dump the shell's envvars. Doom doesn't get any say about the formatting of its output, which is unquoted. I'm not sure how best to solve this at the moment.
EDIT: Actually, we could use env -0 and split on null-bytes. I'll look into it.
I've implemented our own loader in 3ed54e1, which should resolve your issue. Let me know if that isn't the case and I will reopen this. Thanks for bringing it to my attention!
This happens to me too, I have to comment out the following for it to work:
eval (starship init fish)
status --is-interactive; and source (pyenv init -|psub)
@hlissner For me .emacs.d/bin/doom refresh produces the following:
Initiating a refresh of Doom Emacs...
> Regenerating envvars file at "~/.emacs.d/.local/env"
- Scraping shell environment with 'fish -ic env'
(Shell command killed by signal Abort trap: 6)
- Warnings:
<W> fish: Could not send job 4 ('echo "begin; $argv "\n" ;end <&3 3<&-" | source 3<&0') with pgid 4708 to foreground
tcsetpgrp: Inappropriate ioctl for device
<W> fish: Could not send job 7 ('"/usr/local/bin/starship" init fish --print-full-init | psub') with pgid 4709 to foreground
tcsetpgrp: Inappropriate ioctl for device
<W> fish: Could not send job 10 ('mktemp $tmpdir/.psub.XXXXXXXXXX') with pgid 4710 to foreground
tcsetpgrp: Inappropriate ioctl for device
<W> fish: Could not send job 10 ('mktemp $tmpdir/.psub.XXXXXXXXXX') with pgid 4710 to foreground
tcsetpgrp: Inappropriate ioctl for device
/usr/local/Cellar/fish/3.0.2/share/fish/functions/psub.fish (line 35): Invalid redirection target: $filename
cat >$filename
^
in function 'psub'
called on line 1 of file -
in command substitution
called on line 1 of file -
from sourcing file -
called on line 61 of file /usr/local/Cellar/fish/3.0.2/share/fish/functions/eval.fish
in function 'eval'
called on line 38 of file ~/.config/fish/config.fish
from sourcing file ~/.config/fish/config.fish
called during startup
<W> fish: Could not send job 7 ('"/usr/local/bin/starship" init fish --print-full-init | psub') with pgid 4709 to foreground
tcsetpgrp: Inappropriate ioctl for device
<E> fish: /tmp/fish-20191001-57245-2lao97/fish-3.0.2/src/proc.cpp:425: failed assertion: (!job_fg || !job_fg->job_chain_is_fully_constructed() || !j->job_chain_is_fully_constructed()) && "More than one active, fully-constructed foreground job!"
<E> fish: Backtrace:
<E> fish: 0 process_clean_after_marking(bool) + 0
<E> fish: 1 job_reap(bool) + 28
<E> fish: 2 parse_execution_context_t::run_1_job(tnode_t<grammar::job>, block_t const*) + 1863
<E> fish: 3 parse_execution_context_t::run_job_conjunction(tnode_t<grammar::job_conjunction>, block_t const*) + 132
<E> fish: 4 parse_execution_result_t parse_execution_context_t::run_job_list<grammar::job_list>(tnode_t<grammar::job_list>, block_t const*) + 107
<E> fish: 5 parse_execution_context_t::eval_node(tnode_t<grammar::job_list>, block_t const*, io_chain_t const&) + 183
<E> fish: 6 int parser_t::eval_node<grammar::job_list>(std::__1::shared_ptr<parsed_source_t const>, tnode_t<grammar::job_list>, io_chain_t const&, block_type_t, std::__1::shared_ptr<job_t>) + 228
<E> fish: 7 parser_t::eval(std::__1::shared_ptr<parsed_source_t const>, io_chain_t const&, block_type_t) + 136
<E> fish: 8 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >, io_chain_t const&, block_type_t) + 158
<E> fish: 9 exec_subshell_internal(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, std::__1::vector<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >, std::__1::allocator<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > > >*, bool, bool) + 359
<E> fish: 10 expand_cmdsubst(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, std::__1::vector<completion_t, std::__1::allocator<completion_t> >*, std::__1::vector<parse_error_t, std::__1::allocator<parse_error_t> >*) + 516
<E> fish: 11 expand_stage_cmdsubst(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >, std::__1::vector<completion_t, std::__1::allocator<completion_t> >*, int, std::__1::vector<parse_error_t, std::__1::allocator<parse_error_t> >*) + 46
<E> fish: 12 expand_string(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >, std::__1::vector<completion_t, std::__1::allocator<completion_t> >*, int, std::__1::vector<parse_error_t, std::__1::allocator<parse_error_t> >*) + 525
<E> fish: 13 parse_execution_context_t::expand_arguments_from_nodes(std::__1::vector<tnode_t<grammar::argument>, std::__1::allocator<tnode_t<grammar::argument> > > const&, std::__1::vector<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >, std::__1::allocator<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > > >*, parse_execution_context_t::globspec_t) + 271
<E> fish: 14 parse_execution_context_t::populate_plain_process(job_t*, process_t*, tnode_t<grammar::plain_statement>) + 1450
<E> fish: 15 parse_execution_context_t::populate_job_process(job_t*, process_t*, tnode_t<grammar::statement>) + 275
<E> fish: 16 parse_execution_context_t::populate_job_from_job_node(job_t*, tnode_t<grammar::job>, block_t const*) + 208
<E> fish: 17 parse_execution_context_t::run_1_job(tnode_t<grammar::job>, block_t const*) + 1186
<E> fish: 18 parse_execution_context_t::run_job_conjunction(tnode_t<grammar::job_conjunction>, block_t const*) + 132
<E> fish: 19 parse_execution_result_t parse_execution_context_t::run_job_list<grammar::job_list>(tnode_t<grammar::job_list>, block_t const*) + 107
<E> fish: 20 parse_execution_context_t::run_begin_statement(tnode_t<grammar::job_list>) + 63
<E> fish: 21 parse_execution_context_t::run_block_statement(tnode_t<grammar::block_statement>, block_t const*) + 197
<E> fish: 22 parse_execution_context_t::eval_node(tnode_t<grammar::statement>, block_t const*, io_chain_t const&) + 124
<E> fish: 23 int parser_t::eval_node<grammar::statement>(std::__1::shared_ptr<parsed_source_t const>, tnode_t<grammar::statement>, io_chain_t const&, block_type_t, std::__1::shared_ptr<job_t>) + 228
<E> fish: 24 void internal_exec_helper<grammar::statement>(parser_t&, std::__1::shared_ptr<parsed_source_t const>, tnode_t<grammar::statement>, io_chain_t const&, std::__1::shared_ptr<job_t>) + 206
<E> fish: 25 exec_job(parser_t&, std::__1::shared_ptr<job_t>) + 2593
<E> fish: 26 parse_execution_context_t::run_1_job(tnode_t<grammar::job>, block_t const*) + 1622
<E> fish: 27 parse_execution_context_t::run_job_conjunction(tnode_t<grammar::job_conjunction>, block_t const*) + 132
<E> fish: 28 parse_execution_result_t parse_execution_context_t::run_job_list<grammar::job_list>(tnode_t<grammar::job_list>, block_t const*) + 107
<E> fish: 29 parse_execution_context_t::eval_node(tnode_t<grammar::job_list>, block_t const*, io_chain_t const&) + 183
<E> fish: 30 int parser_t::eval_node<grammar::job_list>(std::__1::shared_ptr<parsed_source_t const>, tnode_t<grammar::job_list>, io_chain_t const&, block_type_t, std::__1::shared_ptr<job_t>) + 228
<E> fish: 31 parser_t::eval(std::__1::shared_ptr<parsed_source_t const>, io_chain_t const&, block_type_t) + 136
<E> fish: 32 reader_read(int, io_chain_t const&) + 1787
<E> fish: 33 builtin_source(parser_t&, io_streams_t&, wchar_t**) + 698
<E> fish: 34 builtin_run(parser_t&, int, wchar_t**, io_streams_t&) + 245
<E> fish: 35 exec_job(parser_t&, std::__1::shared_ptr<job_t>) + 4240
<E> fish: 36 parse_execution_context_t::run_1_job(tnode_t<grammar::job>, block_t const*) + 1622
<E> fish: 37 parse_execution_context_t::run_job_conjunction(tnode_t<grammar::job_conjunction>, block_t const*) + 132
<E> fish: 38 parse_execution_result_t parse_execution_context_t::run_job_list<grammar::job_list>(tnode_t<grammar::job_list>, block_t const*) + 107
<E> fish: 39 parse_execution_context_t::eval_node(tnode_t<grammar::job_list>, block_t const*, io_chain_t const&) + 183
<E> fish: 40 int parser_t::eval_node<grammar::job_list>(std::__1::shared_ptr<parsed_source_t const>, tnode_t<grammar::job_list>, io_chain_t const&, block_type_t, std::__1::shared_ptr<job_t>) + 228
<E> fish: 41 void internal_exec_helper<grammar::job_list>(parser_t&, std::__1::shared_ptr<parsed_source_t const>, tnode_t<grammar::job_list>, io_chain_t const&, std::__1::shared_ptr<job_t>) + 206
<E> fish: 42 exec_job(parser_t&, std::__1::shared_ptr<job_t>) + 3145
<E> fish: 43 parse_execution_context_t::run_1_job(tnode_t<grammar::job>, block_t const*) + 1622
<E> fish: 44 parse_execution_context_t::run_job_conjunction(tnode_t<grammar::job_conjunction>, block_t const*) + 132
<E> fish: 45 parse_execution_result_t parse_execution_context_t::run_job_list<grammar::job_list>(tnode_t<grammar::job_list>, block_t const*) + 107
<E> fish: 46 parse_execution_context_t::run_if_statement(tnode_t<grammar::if_statement>, block_t const*) + 409
<E> fish: 47 parse_execution_context_t::run_1_job(tnode_t<grammar::job>, block_t const*) + 572
<E> fish: 48 parse_execution_context_t::run_job_conjunction(tnode_t<grammar::job_conjunction>, block_t const*) + 132
<E> fish: 49 parse_execution_result_t parse_execution_context_t::run_job_list<grammar::job_list>(tnode_t<grammar::job_list>, block_t const*) + 107
<E> fish: 50 parse_execution_context_t::eval_node(tnode_t<grammar::job_list>, block_t const*, io_chain_t const&) + 183
<E> fish: 51 int parser_t::eval_node<grammar::job_list>(std::__1::shared_ptr<parsed_source_t const>, tnode_t<grammar::job_list>, io_chain_t const&, block_type_t, std::__1::shared_ptr<job_t>) + 228
<E> fish: 52 parser_t::eval(std::__1::shared_ptr<parsed_source_t const>, io_chain_t const&, block_type_t) + 136
<E> fish: 53 reader_read(int, io_chain_t const&) + 1787
<E> fish: 54 builtin_source(parser_t&, io_streams_t&, wchar_t**) + 698
<E> fish: 55 builtin_run(parser_t&, int, wchar_t**, io_streams_t&) + 245
<E> fish: 56 exec_job(parser_t&, std::__1::shared_ptr<job_t>) + 4240
<E> fish: 57 parse_execution_context_t::run_1_job(tnode_t<grammar::job>, block_t const*) + 1622
<E> fish: 58 parse_execution_context_t::run_job_conjunction(tnode_t<grammar::job_conjunction>, block_t const*) + 132
<E> fish: 59 parse_execution_result_t parse_execution_context_t::run_job_list<grammar::job_list>(tnode_t<grammar::job_list>, block_t const*) + 107
<E> fish: 60 parse_execution_context_t::eval_node(tnode_t<grammar::job_list>, block_t const*, io_chain_t const&) + 183
<E> fish: 61 int parser_t::eval_node<grammar::job_list>(std::__1::shared_ptr<parsed_source_t const>, tnode_t<grammar::job_list>, io_chain_t const&, block_type_t, std::__1::shared_ptr<job_t>) + 228
<E> fish: 62 parser_t::eval(std::__1::shared_ptr<parsed_source_t const>, io_chain_t const&, block_type_t) + 136
<E> fish: 63 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >, io_chain_t const&, block_type_t) + 158
<E> fish: 64 source_config_in_directory(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&) + 294
<E> fish: 65 main + 3486
<E> fish: 66 start + 1
<E> fish: 67 70 ??? 0x0000000000000003 0x0 + 3
✓ Successfully generated "~/.emacs.d/.local/env"
Running both /usr/local/bin/fish -lc /usr/bin/env and /usr/local/bin/fish -ic /usr/bin/env do not produce any error.
@gguimaraesbr Those warnings can usually be ignored. How did the ~/.emacs.d/.local/env file turn out?
@hlissner Empty. But I found out that it works if I comment out the following line on my config.fish:
eval (starship init fish)
It looks like starship takes over the terminal on startup, which won't work non-interactively. Doom spawns your shell in a non-interactive session, but instructs it to pretend that it is an interactive one, so that it can capture your interactive environment.
Preventing it from running is probably your best course of action, e.g.
;; in ~/.doom.d/init.el
(setenv "INDOOM" "1")
# written in bash/zsh, because I don't know fish script
[[ $INDOOM ]] || eval $(starship init fish)
I do have a rewrite of doom env coming up, which doesn't spawn a shell to scrape the environment from, which will likely fix this matter. I'll keep you posted.
@hlissner thanks!
As of 873fc5c, doom env uses a new method for scraping your shell environment that doesn't require us to invoke your shell (unless you're running it from inside Emacs, rather than from the command line). This should resolve this issue. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!
Most helpful comment
As of 873fc5c,
doom envuses a new method for scraping your shell environment that doesn't require us to invoke your shell (unless you're running it from inside Emacs, rather than from the command line). This should resolve this issue. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!