Skip to content

Commit

Permalink
Rename 'profiles:add' to 'profiles:create' (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
childish-sambino authored Oct 15, 2019
1 parent 831126c commit 1c4f384
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/base-commands/twilio-client-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class TwilioClientCommand extends BaseCommand {
const reportUnconfigured = (verb, message = '') => {
const profileParam = this.flags.profile ? ' -p ' + this.flags.profile : '';
throw new TwilioCliError(
`To ${verb} the profile, run: ` + chalk.whiteBright('twilio profiles:add' + profileParam) + message
`To ${verb} the profile, run: ` + chalk.whiteBright('twilio profiles:create' + profileParam) + message
);
};

if (!this.currentProfile) {
this.logger.error('No profile configured.');
reportUnconfigured('add', '\n\n' + HELP_ENVIRONMENT_VARIABLES);
reportUnconfigured('create', '\n\n' + HELP_ENVIRONMENT_VARIABLES);
}

this.logger.debug('Using profile: ' + this.currentProfile.id);
Expand Down
6 changes: 3 additions & 3 deletions test/base-commands/twilio-client-command.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ describe('base-commands', () => {
.exit(1)
.it('should fail for a non-existent active profile', ctx => {
expect(ctx.stderr).to.contain('No profile configured');
expect(ctx.stderr).to.contain('To add the profile, run: twilio profiles:add');
expect(ctx.stderr).to.contain('To create the profile, run: twilio profiles:create');
expect(ctx.stderr).to.contain('TWILIO_ACCOUNT_SID');
});

setUpTest(['-p', 'alt', '-l', 'debug'])
.exit(1)
.it('should fail for a non-existent profile', ctx => {
expect(ctx.stderr).to.contain('No profile configured');
expect(ctx.stderr).to.contain('To add the profile, run: twilio profiles:add -p alt');
expect(ctx.stderr).to.contain('To create the profile, run: twilio profiles:create -p alt');
expect(ctx.stderr).to.contain('TWILIO_ACCOUNT_SID');
});

Expand All @@ -106,7 +106,7 @@ describe('base-commands', () => {
.it('should handle a secure storage error', ctx => {
expect(ctx.stderr).to.contain('Could not get credentials for profile "twilio-cli-unit-testing"');
expect(ctx.stderr).to.contain(
'To reconfigure the profile, run: twilio profiles:add -p twilio-cli-unit-testing'
'To reconfigure the profile, run: twilio profiles:create -p twilio-cli-unit-testing'
);
});

Expand Down

0 comments on commit 1c4f384

Please sign in to comment.