Skip to content

Commit

Permalink
fix: rename flag --environment to --target-env (#92)
Browse files Browse the repository at this point in the history
Co-authored-by: Rodrigo Espinosa de los Monteros <[email protected]>
Co-authored-by: Juliet Shackell <[email protected]>
  • Loading branch information
3 people authored Jul 21, 2021
1 parent 362782e commit d0c8f47
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
14 changes: 13 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ parameters:
default: ''
type: string
repo_tag:
description: 'The tag of the module repo to checkout, '''' defaults to branch/PR'
description: "The tag of the module repo to checkout, '' defaults to branch/PR"
default: ''
type: string
workflows:
Expand All @@ -55,6 +55,18 @@ workflows:
node_version: lts
- os: windows
node_version: maintenance
- release-management/test-nut:
matrix:
parameters:
os:
- linux
- windows
sfdx_version:
- latest
node_version:
- latest
requires:
- release-management/test-package
- release-management/release-package:
sign: true
github-release: true
Expand Down
6 changes: 3 additions & 3 deletions messages/display.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Output depends on the type of environment. For example, scratch org details incl

- Display details about a scratch org with alias my-scratch-org:

<%= config.bin %> <%= command.id %> --target-env=my-scratch-org
<%= config.bin %> <%= command.id %> --target-env=my-scratch-org

- Specify a username instead of an alias:

<%= config.bin %> <%= command.id %> --target-env=[email protected]
<%= config.bin %> <%= command.id %> --target-env=[email protected]

- Specify JSON format and redirect output into a file:

<%= config.bin %> <%= command.id %> --target-env=my-scratch-org --json > tmp/MyOrdDesc.json
<%= config.bin %> <%= command.id %> --target-env=my-scratch-org --json > tmp/MyOrdDesc.json

# flags.target-env.summary

Expand Down
2 changes: 1 addition & 1 deletion src/commands/env/display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class EnvDisplay extends Command {
if (await AuthInfo.hasAuthentications()) {
authorizations = await AuthInfo.listAllAuthorizations();

const targetEnv = Reflect.get(flags, 'target-env') as string;
const targetEnv = flags['target-env'];

if (!targetEnv) {
// TODO this should be retrieved from sf config once we have those commands. If not found, still throw.
Expand Down
2 changes: 1 addition & 1 deletion test/commands/env/display.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('env display NUTs', () => {
});

it('should display dev hub', () => {
const command = `env display --environment ${usernameOrAlias}`;
const command = `env display --target-env ${usernameOrAlias}`;
const output = execCmd(command, { ensureExitCode: 0 }).shellOutput.stdout;
expect(output).to.contain(usernameOrAlias);
});
Expand Down

0 comments on commit d0c8f47

Please sign in to comment.