style(pi): wrap mode arg lookup
parent
958c13e02d
commit
768887fc0f
|
|
@ -188,7 +188,8 @@ export const piSpec: AgentSpec = {
|
||||||
const argv = [...ctx.argv];
|
const argv = [...ctx.argv];
|
||||||
let bodyPos = ctx.bodyIndex;
|
let bodyPos = ctx.bodyIndex;
|
||||||
const modeIdx = argv.indexOf("--mode");
|
const modeIdx = argv.indexOf("--mode");
|
||||||
const modeVal = modeIdx >= 0 ? argv[modeIdx + 1]?.toString().toLowerCase() : undefined;
|
const modeVal =
|
||||||
|
modeIdx >= 0 ? argv[modeIdx + 1]?.toString().toLowerCase() : undefined;
|
||||||
const isRpcMode = modeVal === "rpc";
|
const isRpcMode = modeVal === "rpc";
|
||||||
// Non-interactive print + JSON
|
// Non-interactive print + JSON
|
||||||
if (!isRpcMode && !argv.includes("-p") && !argv.includes("--print")) {
|
if (!isRpcMode && !argv.includes("-p") && !argv.includes("--print")) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue