fix: .party-notify uses PARTY_TMUX, not bare tmux from PATH
This commit is contained in:
parent
fc366f48fa
commit
7d95850461
2 changed files with 23 additions and 3 deletions
|
|
@ -51,3 +51,14 @@ party_rec() { printf '%s/party-%s:%s.d/roster\n' "$PARTY_SOCKET_DIR" "$USER" "$1
|
|||
[ "$g" = "$TMUX_PARTY_GROUP" ] \
|
||||
|| { echo "notify_script group=$g, expected $TMUX_PARTY_GROUP"; false; }
|
||||
}
|
||||
|
||||
@test ".party-notify pins the PARTY_TMUX binary used at host time" {
|
||||
"$PARTY_BIN" host pintmux
|
||||
rec=$(party_rec pintmux)
|
||||
sock=$(awk -F= '$1=="SOCKET"{print $2}' "$rec")
|
||||
notify_script="${sock%/*}/.party-notify"
|
||||
# The helper must not reach for a bare `tmux` from PATH: it pins the
|
||||
# binary the party was hosted with (PARTY_TMUX, default "tmux").
|
||||
grep -q "^tmux=\"${PARTY_TMUX:-tmux}\"$" "$notify_script"
|
||||
! grep -qE '^[[:space:]]*tmux -S' "$notify_script"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue