Skip to content

Commit

Permalink
fix: add summary field to org flags (#137)
Browse files Browse the repository at this point in the history
* fix: add desc to sfdx org flags

* fix: do not deprecate `-v` short flag [skip-ci]

* fix: description -> summary [skip ci]
  • Loading branch information
cristiand391 committed Nov 17, 2022
1 parent 33e8203 commit 936dea0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions messages/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ No default dev hub found. Use -v or --target-dev-hub to specify an environment.

The specified org %s is not a Dev Hub.

# flags.targetOrg.summary

Username or alias of the target org.

# flags.targetDevHubOrg.summary

Username or alias of the Dev Hub org.

# flags.apiVersion.description

Override the api version used for api requests made by this command
Expand Down
2 changes: 1 addition & 1 deletion src/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ export const requiredOrgFlagWithDeprecations = requiredOrgFlag({
* @deprecated
*/
export const requiredHubFlagWithDeprecations = requiredHubFlag({
aliases: ['targetdevhubusername', 'v'],
aliases: ['targetdevhubusername'],
deprecateAliases: true,
});
2 changes: 2 additions & 0 deletions src/flags/orgFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const optionalOrgFlag = Flags.custom({
*/
export const requiredOrgFlag = Flags.custom({
char: 'o',
summary: messages.getMessage('flags.targetOrg.summary'),
parse: async (input: string | undefined) => getOrgOrThrow(input),
default: async () => getOrgOrThrow(),
defaultHelp: async () => (await getOrgOrThrow())?.getUsername(),
Expand Down Expand Up @@ -126,6 +127,7 @@ export const requiredOrgFlag = Flags.custom({
*/
export const requiredHubFlag = Flags.custom({
char: 'v',
summary: messages.getMessage('flags.targetDevHubOrg.summary'),
parse: async (input: string | undefined) => getHubOrThrow(input),
default: async () => getHubOrThrow(),
defaultHelp: async () => (await getHubOrThrow())?.getUsername(),
Expand Down

0 comments on commit 936dea0

Please sign in to comment.