fix: pin absolute script path in status-right widget
The #() body runs with the tmux server's PATH; a bare 'party' silently broke the widget for uninstalled or non-standard-prefix hosts.
This commit is contained in:
parent
7d95850461
commit
2ef4eb49ce
2 changed files with 23 additions and 2 deletions
|
|
@ -19,12 +19,16 @@ party_rec() { printf '%s/party-%s:%s.d/roster\n' "$PARTY_SOCKET_DIR" "$USER" "$1
|
|||
[[ "$out" == *"client-detached"* ]]
|
||||
}
|
||||
|
||||
@test "status-right widget is configured" {
|
||||
@test "status-right widget is configured with an absolute self path" {
|
||||
"$PARTY_BIN" host srtest
|
||||
rec=$(party_rec srtest)
|
||||
sock=$(awk -F= '$1=="SOCKET"{print $2}' "$rec")
|
||||
sr=$(tmux -S "$sock" show-options -gv status-right)
|
||||
[[ "$sr" == *"party who --short"* ]]
|
||||
# The #() body is executed with the tmux server's PATH, which need
|
||||
# not contain an installed `party` — the widget must pin the absolute
|
||||
# path of the script that hosted the party.
|
||||
[[ "$sr" == "party: #(/"* ]]
|
||||
}
|
||||
|
||||
@test "client-attached hook invokes a notify helper that broadcasts display-message" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue