Skip to content

Commit

Permalink
feat: add a default summary for optional orgs (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed May 30, 2024
1 parent 1f91e32 commit 8793406
Show file tree
Hide file tree
Showing 2 changed files with 10 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 @@ -42,10 +42,18 @@ The specified org %s is not a Dev Hub.

Username or alias of the target org. Not required if the `target-org` configuration variable is already set.

# flags.optionalTargetOrg.summary

Username or alias of the target org.

# flags.targetDevHubOrg.summary

Username or alias of the Dev Hub org. Not required if the `target-dev-hub` configuration variable is already set.

# flags.optionalTargetDevHubOrg.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
3 changes: 2 additions & 1 deletion src/flags/orgFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const optionalOrgFlag = Flags.custom({
char: 'o',
noCacheDefault: true,
parse: async (input: string | undefined) => maybeGetOrg(input),
summary: messages.getMessage('flags.optionalTargetOrg.summary'),
default: async () => maybeGetOrg(),
defaultHelp: async (context) => {
if (context.options instanceof Org) {
Expand Down Expand Up @@ -211,7 +212,7 @@ export const requiredHubFlag = Flags.custom({
*/
export const optionalHubFlag = Flags.custom({
char: 'v',
summary: messages.getMessage('flags.targetDevHubOrg.summary'),
summary: messages.getMessage('flags.optionalTargetDevHubOrg.summary'),
noCacheDefault: true,
parse: async (input: string | undefined) => maybeGetHub(input),
default: async () => maybeGetHub(),
Expand Down

0 comments on commit 8793406

Please sign in to comment.