Skip to content

Commit

Permalink
Bugfix (Github Issue #74)
Browse files Browse the repository at this point in the history
  • Loading branch information
greymd committed Jan 7, 2018
1 parent cfde672 commit f03118e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions bin/xpanes
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,14 @@ xpns_prepare_window() {
xpns_check_env() {
local _cmds="$1"
while read -r cmd ; do
if ! type "$cmd" > /dev/null 2>&1; then
xpns_msg "Error" "$cmd is required to work."
exit $XP_ENOCMD
if ! type "${cmd}" > /dev/null 2>&1; then
if [[ "${cmd}" == "tmux" ]] && [[ "${TMUX_XPANES_EXEC}" == "tmux" ]]; then
xpns_msg "Error" "${cmd} is required. Install ${cmd} or set TMUX_XPANES_EXEC variable."
exit $XP_ENOCMD
elif [[ "${cmd}" != "tmux" ]]; then
xpns_msg "Error" "${cmd} is required."
exit $XP_ENOCMD
fi
fi
done < <(echo "$_cmds" | tr ' ' '\n')

Expand Down

0 comments on commit f03118e

Please sign in to comment.