diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-05-03 14:29:45 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-05-03 14:29:45 +0300 |
commit | e665281508431e2ad791ad9c5935f40417b6bd4b (patch) | |
tree | 384ca0c2536432d133532c30b5fa71e7368d15af | |
parent | 79a783fb3c694f8695fefd4e8241b06287f04b73 (diff) |
pull upstream changes from gitstatus
-rw-r--r-- | gitstatus/gitstatus.plugin.zsh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh index f113c17e..d7b32d65 100644 --- a/gitstatus/gitstatus.plugin.zsh +++ b/gitstatus/gitstatus.plugin.zsh @@ -225,6 +225,7 @@ function gitstatus_start() { [[ -z ${(P)${:-GITSTATUS_DAEMON_PID_${name}}:-} ]] || return 0 + local dir && dir=${${(%):-%x}:A:h} local xtrace_file lock_file req_fifo resp_fifo log_file local -i stderr_fd=-1 lock_fd=-1 req_fd=-1 resp_fd=-1 daemon_pid=-1 @@ -239,7 +240,7 @@ function gitstatus_start() { local os && os=$(uname -s) && [[ -n $os ]] local arch && arch=$(uname -m) && [[ -n $arch ]] - local daemon && daemon=${GITSTATUS_DAEMON:-${${(%):-%x}:A:h}/bin/gitstatusd-${os:l}-${arch:l}} + local daemon && daemon=${GITSTATUS_DAEMON:-$dir/bin/gitstatusd-${os:l}-${arch:l}} [[ -f $daemon ]] || { echo "file not found: $daemon" >&2 && return 1 } lock_file=$(mktemp "${TMPDIR:-/tmp}"/gitstatus.$$.lock.XXXXXXXXXX) |