From 498e5fa9b0be1f96328cbfcca7ea1e17d034b226 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Tue, 10 Aug 2021 21:28:01 -0500 Subject: [PATCH] [tests] Set permissions on tmux socket after creation --- tests/checks/tmux-bind.fish | 3 +++ tests/checks/tmux-complete.fish | 3 +++ tests/checks/tmux-prompt.fish | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/checks/tmux-bind.fish b/tests/checks/tmux-bind.fish index d15cb85d7..5e84df6d7 100644 --- a/tests/checks/tmux-bind.fish +++ b/tests/checks/tmux-bind.fish @@ -23,6 +23,9 @@ $tmux new-session -x 80 -y 10 -d $fish -C ' # No autosuggestion from older history. set fish_history "" ' +# Set the correct permissions for the newly created socket to allow future connections. +# This is required at least under WSL or else each invocation will return a permissions error. +chmod 777 .tmux-socket $sleep # Let fish draw a prompt. # Test moving around with up-or-search on a multi-line commandline. diff --git a/tests/checks/tmux-complete.fish b/tests/checks/tmux-complete.fish index ab4c78d52..786864cc7 100644 --- a/tests/checks/tmux-complete.fish +++ b/tests/checks/tmux-complete.fish @@ -23,6 +23,9 @@ $tmux new-session -x 80 -y 10 -d $fish -C ' # No autosuggestion from older history. set fish_history "" ' +# Set the correct permissions for the newly created socket to allow future connections. +# This is required at least under WSL or else each invocation will return a permissions error. +chmod 777 .tmux-socket $sleep # Let fish draw a prompt. # Don't escape existing token (#7526). diff --git a/tests/checks/tmux-prompt.fish b/tests/checks/tmux-prompt.fish index 71940a717..a32342df9 100644 --- a/tests/checks/tmux-prompt.fish +++ b/tests/checks/tmux-prompt.fish @@ -32,7 +32,9 @@ $tmux new-session -x 80 -y 10 -d $fish -C ' commandline -f repaint end ' - +# Set the correct permissions for the newly created socket to allow future connections. +# This is required at least under WSL or else each invocation will return a permissions error. +chmod 777 .tmux-socket $sleep # Let fish draw a prompt. $tmux capture-pane -p