mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-11-20 10:51:13 +00:00
a4ff6acd56
In some cases TMPDIR may not be set, in which case it could cause issues for zsh modules. This change was prompted by issue #1331. Also when creating a missing TMPDIR, use mkdir --mode=700 instead of creating the directory and then chmoding it afterward.
12 lines
315 B
Bash
12 lines
315 B
Bash
#
|
|
# Defines environment variables.
|
|
#
|
|
# Authors:
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
#
|
|
|
|
# Ensure that a non-login, non-interactive shell has a defined environment.
|
|
if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN || -z "${TMPDIR}" ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
|
|
source "${ZDOTDIR:-$HOME}/.zprofile"
|
|
fi
|