fix: v2.6.2 — Windows panes no longer read as dead (psmux ignores -F), Update now's setup works under cmd.exe
- psmux prints `name: 1 windows (created …)` whatever `list-sessions -F`
asks for. Read as names, every live pane looked gone and the heal beat
closed its run (and its tab) within seconds while the session kept
running. tmux.js (and the Update all helper) now take the text before the
first `:` — a session name never holds one.
- `npm run setup` used `(cd client && npm install)`; cmd.exe's ( ) is no
subshell, so `npm run link-cli` ran inside client/ ("Missing script") and
Update now failed on Windows. Now `npm --prefix client install`.
- Update now: an npm step names itself in its error and shows the END of
npm's output (the error, not the warnings), says when it hit the time
limit, and gets 20 min instead of 5.
This commit is contained in:
+12
-3
@@ -196,6 +196,15 @@ function __reset() {
|
||||
// too and is shared; any other failure is not.
|
||||
const LIST_TTL_MS = 1000;
|
||||
const LIST_ARGS = ["list-sessions", "-F", "#{session_name}"];
|
||||
// psmux (Windows) ignores `-F` and prints `name: 1 windows (created …)`. A
|
||||
// session name never holds a `:` (tmux rewrites it), so the text before the
|
||||
// first one is the name in either form.
|
||||
const sessionNames = (out) =>
|
||||
String(out)
|
||||
.split("\n")
|
||||
.map((l) => l.split(":")[0].trim())
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
let listed = new Map(); // member login ("" = ours) → { at, out } | { at, err }
|
||||
let listGen = 0; // bumped by a change this process makes: drops lists in flight
|
||||
function listOutput(acct = null) {
|
||||
@@ -206,7 +215,7 @@ function listOutput(acct = null) {
|
||||
return hit.out;
|
||||
}
|
||||
try {
|
||||
const out = String(execImpl(LIST_ARGS));
|
||||
const out = sessionNames(execImpl(LIST_ARGS));
|
||||
listed.set("", { at: Date.now(), out });
|
||||
return out;
|
||||
} catch (err) {
|
||||
@@ -252,7 +261,7 @@ function refreshList(acct) {
|
||||
// about another pane) is not believed.
|
||||
(out) =>
|
||||
done({
|
||||
out: String(out)
|
||||
out: sessionNames(out)
|
||||
.split("\n")
|
||||
.filter((n) => ownedBy(n.trim(), acct))
|
||||
.join("\n"),
|
||||
@@ -308,7 +317,7 @@ function exact() {
|
||||
if (exactTargets !== null) return exactTargets;
|
||||
let first;
|
||||
try {
|
||||
first = String(execImpl(["list-sessions", "-F", "#{session_name}"]))
|
||||
first = sessionNames(execImpl(LIST_ARGS))
|
||||
.split("\n")
|
||||
.map((x) => x.trim())
|
||||
.find(Boolean);
|
||||
|
||||
Reference in New Issue
Block a user