diff --git a/.changeset/metal-poets-serve.md b/.changeset/metal-poets-serve.md new file mode 100644 index 000000000000..3b4f8f59bb27 --- /dev/null +++ b/.changeset/metal-poets-serve.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/live-cli": patch +--- + +fix(cli): print `listApps` output only once diff --git a/apps/cli/src/commands/device/listApps.ts b/apps/cli/src/commands/device/listApps.ts index 66343a9c0132..b12294536a98 100644 --- a/apps/cli/src/commands/device/listApps.ts +++ b/apps/cli/src/commands/device/listApps.ts @@ -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"; @@ -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))), };