The correct way to activate execution trace or source trace at the time
/etc/zshenv is loaded is to activate it at the shell command:
zsh -l -o xtrace,
zsh -l -o sourcetrace -- be sure to try with the
-l option, since the path element might only be added at login.
Beside this, if you are still getting a path element added before
/etc/zshenv is loaded, you could check for a
~/.pam_environment file. This is the user-local version of the
/etc/environment file and is loaded at about the same time, before the shell or user environment. Check the man page "pam_env" for more details about the format used - it is different for the user file.
One other minor possibility is the
ENV environment variable. When a SH-compatible shell is started in SH-compatible mode, the file whose path is in
ENV is loaded as a startup file before anything else. Search your shell's documentation for more detail.
login.defs is also used at login and by various user/login utilities, but
/etc/environment is the standard for all modern login systems and is prefered for establishing the