Skip to content

Add packageId to force:package:version:report response #13

@fischerp

Description

@fischerp

Is your feature request related to a problem? Please describe.
I need to get the packageId when executing the following command.
sfdx force:package:version:report -p "myPackage" --json
or
sfdx force:package:version:report -p "04t50000000AbcD" --json

What are you trying to do
I want to get the package id from a specific attribute called packageId. Currently the Id is available on the message, but there is no easy way to extract it.

Describe the solution you'd like
I want to execute sfdx force:package:version:report -p "myPackage" --json or sfdx force:package:version:report -p "04t50000000AbcD" --json and I want to have an easy way to get the ID from the response.

Current return:
{"message":"The Subscriber Package Version Id 04t50000000AbcD is invalid, ...

Expected result:
{"packageId":"04t50000000AbcD","message":"The Subscriber Package Version Id 04t50000000AbcD is invalid, ...

Describe alternatives you've considered
A poor alternative would be extract it from specific parts to the current response or by reading the sfdx-project.json file to get the ID.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions