@askexenow/exe-os 0.8.98 → 0.8.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/exe-start.sh +9 -4
- package/package.json +1 -1
package/dist/bin/exe-start.sh
CHANGED
|
@@ -56,10 +56,15 @@ if [ "${1:-}" = "go" ]; then
|
|
|
56
56
|
|
|
57
57
|
if tmux has-session -t "$SESSION" 2>/dev/null; then
|
|
58
58
|
# Detect if already inside the target session — prevent double-attach
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
# Only check if we're actually inside tmux (TMUX or TMUX_PANE set).
|
|
60
|
+
# tmux display-message works even outside tmux and returns the last
|
|
61
|
+
# active session, which gives false positives on single-session machines.
|
|
62
|
+
if [ -n "${TMUX:-}" ] || [ -n "${TMUX_PANE:-}" ]; then
|
|
63
|
+
CURRENT_SESSION="$(tmux display-message -p '#{session_name}' 2>/dev/null || true)"
|
|
64
|
+
if [ "$CURRENT_SESSION" = "$SESSION" ]; then
|
|
65
|
+
echo " Already inside ${SESSION}."
|
|
66
|
+
exit 0
|
|
67
|
+
fi
|
|
63
68
|
fi
|
|
64
69
|
# Unset TMUX to allow attach from auto-tmux shells (common zsh/bash configs).
|
|
65
70
|
# -d detaches other clients to prevent status-bar-in-body rendering bug.
|
package/package.json
CHANGED