TACC / Lmod

Lmod: An Environment Module System based on Lua, Reads TCL Modules, Supports a Software Hierarchy
http://lmod.readthedocs.org
Other
489 stars 126 forks source link

Zsh startup fails for lmod installed wtih homebrew #716

Closed rtmclay closed 2 months ago

rtmclay commented 2 months ago

This code has problems on homebrew:

if [ -n "${ZSH_VERSION+x}" -a -z "${__LMOD_SET_ZSH_FPATH+x}" ]; then
  export __LMOD_SET_ZSH_FPATH=1
  zv=${ZSH_VERSION}
  orig_zsh_version=@orig_zsh_version@
  zsh_fpath=@zsh_fpath@
  zsh_fpath=$(echo $zsh_fpath | sed -e "s|/$orig_zsh_version/|/$zv/|g" )
  export FPATH=$(@PKGV@/libexec/addto --append FPATH $zsh_fpath @PKGV@/init/ksh_funcs)
  unset zv
  unset orig_zsh_version
  unset zsh_fpath
fi

Namely the homebrew sets these variables to nothing

  orig_zsh_version=
  zsh_fpath=
rtmclay commented 2 months ago

This fix has been installed in Lmod 8.7.47

shiltian commented 2 months ago

I can confirm that this can fix the issue.

rtmclay commented 2 months ago

Closing this issue