Skip to content

Commit

Permalink
🐛 (cli): print listApps output only once
Browse files Browse the repository at this point in the history
The result of the `listApps` command is currently printed twice:
- in the lines removed in this commit
- in the `next` callback function of the main subscriber
  • Loading branch information
francois-guerin-ledger committed Feb 5, 2025
1 parent a67d6ff commit 3973bba
Showing 1 changed file with 2 additions and 9 deletions.
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 3973bba

Please sign in to comment.