Skip to content

Commit

Permalink
another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoviola committed Nov 19, 2023
1 parent 1070711 commit dffc632
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions javascript/packages/orchestrator/src/paras.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,9 @@ function getChainSpecCmdRaw(chainSpecCommand: string) {
// Inject the chain (e.g. --chain <chain path>) before the output file or the
// shell redirection `>`.
function injectChainInCmd(cmd: string, chain: string): string {
const parts = cmd.split(" ");
const parts = cmd.split(" ").filter(Boolean);
const l = parts.length;
const index = parts[l - 3] == ">" ? l - 3 : l - 2;
const index = parts[l - 2] == ">" ? l - 2 : l - 1;
parts.splice(index, 0, `--chain ${chain}`);
return parts.join(" ");
}

0 comments on commit dffc632

Please sign in to comment.