Skip to content

Commit

Permalink
[Fix sorin-ionescu#514] Use /tmp when $TMPDIR is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
RIT80 committed Jan 3, 2014
1 parent 1dcb0ed commit 8307f5e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/gpg/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fi

# Set the default paths to gpg-agent files.
_gpg_agent_conf="$HOME/.gnupg/gpg-agent.conf"
_gpg_agent_env="$TMPDIR/gpg-agent.env"
_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env"

# Start gpg-agent if not started.
if ! ps -U "$USER" -o ucomm | grep -q gpg-agent; then
Expand Down
2 changes: 1 addition & 1 deletion modules/pacman/functions/pacman-list-disowned
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Sorin Ionescu <sorin.ionescu@gmail.com>
#

local tmp="$TMPDIR/pacman-disowned-$UID-$$"
local tmp="${TMPDIR:-/tmp}/pacman-disowned-$UID-$$"
local db="$tmp/db"
local fs="$tmp/fs"

Expand Down
4 changes: 2 additions & 2 deletions modules/ssh/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ fi
_ssh_dir="$HOME/.ssh"

# Set the path to the environment file if not set by another module.
_ssh_agent_env="${_ssh_agent_env:-$TMPDIR/ssh-agent.env}"
_ssh_agent_env="${_ssh_agent_env:-${TMPDIR:-/tmp}/ssh-agent.env}"

# Set the path to the persistent authentication socket.
_ssh_agent_sock="$TMPDIR/ssh-agent.sock"
_ssh_agent_sock="${TMPDIR:-/tmp}/ssh-agent.sock"

# Start ssh-agent if not started.
if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
Expand Down

0 comments on commit 8307f5e

Please sign in to comment.