Skip to content

Commit

Permalink
fix/lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoviola committed Dec 1, 2023
1 parent 37cfda6 commit 6044762
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
5 changes: 4 additions & 1 deletion javascript/packages/orchestrator/src/cmdGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,10 @@ export async function genCmd(

if (validator) {
if (!args.includes("--validator")) args.push("--validator");
if (nodeSetup.substrateCliArgsVersion >= SubstrateCliArgsVersion.V2) {
if (
nodeSetup.substrateCliArgsVersion &&
nodeSetup.substrateCliArgsVersion >= SubstrateCliArgsVersion.V2
) {
args.push("--insecure-validator-i-know-what-i-do");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export const getCliArgsVersion = async (
await client.spawnFromDef(podDef);
const logs = await client.getNodeLogs(podName);

if logs.includes("--ws-port <PORT>") {
if (logs.includes("--ws-port <PORT>")) {
return SubstrateCliArgsVersion.V0;
} else if !logs.includes("--insecure-validator-i-know-what-i-do") {
} else if (!logs.includes("--insecure-validator-i-know-what-i-do")) {
return SubstrateCliArgsVersion.V1;
} else {
return SubstrateCliArgsVersion.V2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ export const getCliArgsVersion = async (
const logs = (await client.runCommand(["-c", fullCmd], { allowFail: true }))
.stdout;


if logs.includes("--ws-port <PORT>") {
if (logs.includes("--ws-port <PORT>")) {
return SubstrateCliArgsVersion.V0;
} else if !logs.includes("--insecure-validator-i-know-what-i-do") {
} else if (!logs.includes("--insecure-validator-i-know-what-i-do")) {
return SubstrateCliArgsVersion.V1;
} else {
return SubstrateCliArgsVersion.V2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ export const getCliArgsVersion = async (
await client.spawnFromDef(podDef);
const logs = await client.getNodeLogs(podName);


if logs.includes("--ws-port <PORT>") {
if (logs.includes("--ws-port <PORT>")) {
return SubstrateCliArgsVersion.V0;
} else if !logs.includes("--insecure-validator-i-know-what-i-do") {
} else if (!logs.includes("--insecure-validator-i-know-what-i-do")) {
return SubstrateCliArgsVersion.V1;
} else {
return SubstrateCliArgsVersion.V2;
Expand Down

0 comments on commit 6044762

Please sign in to comment.