Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rename flag --environment to --target-env #92

Merged
merged 10 commits into from
Jul 21, 2021
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 %> [email protected]
<%= config.bin %> <%= command.id %> [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