bus, cli: a tester message to a role nobody holds refuses tester-target-not-running, and talk --tester exits 3 (row 170, #1667)
This commit is contained in:
1 parent
228aeb5037
commit
cb43dcb45e
6 files changed
+123
-16
No files matched your search
@@ -339,8 +339,6 @@ function waitingLines(w, business) {
|
||||
// Row 152 (#1646): launch.by can launch only launch.instances. An older bus sends no
|
||||
// launchable, so only an explicit false prints this line.
|
||||
if (w.launchable === false) return `${w.role} isn't running and isn't in the launch block, so ${w.launcher} can't launch it\n`;
|
||||
// A human's message to another role always tells launch.by; a tester's never does.
|
||||
if (!w.told) return `${w.role} isn't running; a tester's message tells nobody to launch it\n`;
|
||||
return `${w.role} isn't running, ${w.launcher} has been told\n` + (w.launcherRunning ? "" : restart(w.launcher, " either"));
|
||||
}
|
||||
|
||||
@@ -383,6 +381,11 @@ async function talk(rest, io, deps, receiveOnly = false) {
|
||||
if (e.code === "thread-required-use-thread-send") {
|
||||
throw new CliError(`${to} runs in threads, so a message to it names one: mosaic talk --thread <thread> <text>; mosaic threads lists yours`, 2);
|
||||
}
|
||||
// Row 170 (#1667): the bus stores no tester message to a role nobody holds. Exit 3 like the
|
||||
// other tester refusals; transport.mjs's EXIT map stays as row 164 pinned it.
|
||||
if (e.code === "tester-target-not-running" && parsed.flags.has("--tester")) {
|
||||
throw new CliError(`${to} isn't running, so the tester's message was refused and nothing was stored`, 3);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
io.stdout.write(`sent ${shortId(sent.id)} to ${to}\n`);
|
||||
|
||||
Reference in new issue
Block a user