Skip to content

Commit

Permalink
fix: don't interactively ask for the env in fluence default peers c…
Browse files Browse the repository at this point in the history
…ommand when env is provided as an arg [fixes DXJ-775] (#907)
  • Loading branch information
shamsartem authored Apr 17, 2024
1 parent c810588 commit 26ca66b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/commands/default/peers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
*/

import { BaseCommand, baseFlags } from "../../baseCommand.js";
import { setChainFlags } from "../../lib/chainFlags.js";
import { commandObj } from "../../lib/commandObj.js";
import { ENV_ARG } from "../../lib/const.js";
import { ENV_ARG, ENV_ARG_NAME, ENV_FLAG_NAME } from "../../lib/const.js";
import { initCli } from "../../lib/lifeCycle.js";
import { resolveRelays } from "../../lib/multiaddres.js";

Expand All @@ -30,7 +31,8 @@ export default class Peers extends BaseCommand<typeof Peers> {
...ENV_ARG,
};
async run(): Promise<void> {
await initCli(this, await this.parse(Peers));
const { args } = await initCli(this, await this.parse(Peers));
setChainFlags({ [ENV_FLAG_NAME]: args[ENV_ARG_NAME] });
const relays = await resolveRelays();
commandObj.log(relays.join("\n"));
}
Expand Down

0 comments on commit 26ca66b

Please sign in to comment.