Update launch-in-tmux to avoid some error messages
If tmux wasn't already running it would output an error but still work. The new approach will suppress that since we're not concerned if it's already running or not, just whether the desired session is. Modified the live macOS args to support connecting to the HW-Diags session remotely (more easily at least).
This commit is contained in:
parent
50e4164bf8
commit
cce8651e00
1 changed files with 43 additions and 43 deletions
|
|
@ -5,7 +5,7 @@
|
|||
# Live macOS env workaround
|
||||
tmux_args=()
|
||||
if [[ -e "/.wk-live-macos" ]]; then
|
||||
tmux_args=(-f "/etc/tmux.conf" -S "$(mktemp).socket")
|
||||
tmux_args=(-f "/etc/tmux.conf" -S "/Volumes/RAM_Disk/.tmux.socket")
|
||||
fi
|
||||
|
||||
function ask() {
|
||||
|
|
@ -31,7 +31,7 @@ function launch_in_tmux() {
|
|||
[[ -n "${TMUX_CMD:-}" ]] || return $(err "Required variable missing (TMUX_CMD)")
|
||||
|
||||
# Check for running session
|
||||
if tmux "${tmux_args[@]}" list-session | grep -q "$SESSION_NAME"; then
|
||||
if tmux "${tmux_args[@]}" list-session 2>&1 | grep -q "$SESSION_NAME"; then
|
||||
echo "WARNING: tmux session $SESSION_NAME already exists."
|
||||
echo ""
|
||||
if ask "Connect to current session?"; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue