Skip to content

Commit

Permalink
Merge pull request #9127 from LedgerHQ/fix/no-issue-listApps-printed-…
Browse files Browse the repository at this point in the history
…twice

🐛 (cli): print `listApps` output only once
  • Loading branch information
francois-guerin-ledger authored Feb 10, 2025
2 parents 87279d6 + f502aa5 commit 1bef14e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-poets-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/live-cli": patch
---

fix(cli): print `listApps` output only once
11 changes: 2 additions & 9 deletions apps/cli/src/commands/device/listApps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { from, tap } from "rxjs";
import { from } from "rxjs";
import { withDevice } from "@ledgerhq/live-common/hw/deviceAccess";
import listApps from "@ledgerhq/live-common/hw/listApps";
import { DeviceCommonOpts, deviceOpt } from "../../scan";
Expand All @@ -8,12 +8,5 @@ export type ListAppsJobOpts = DeviceCommonOpts;
export default {
description: "list all installed apps on the device",
args: [deviceOpt],
job: ({ device }: ListAppsJobOpts) =>
withDevice(device || "")(t =>
from(listApps(t)).pipe(
tap(res => {
console.log(res);
}),
),
),
job: ({ device }: ListAppsJobOpts) => withDevice(device || "")(t => from(listApps(t))),
};

0 comments on commit 1bef14e

Please sign in to comment.