-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: add --json to compute add collaborator #469
base: main
Are you sure you want to change the base?
Conversation
Git2Gus App is installed but the |
@@ -74,5 +72,8 @@ export default class ComputeCollaboratorAdd extends Command { | |||
this.log( | |||
'For more information about attaching Heroku add-ons to your compute environments, run $ heroku addons:attach --help.' | |||
); | |||
return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user includes the --json flag, the error output should be in json also.
Try adding in:
if (shouldExitNonZero) {
this.exit(1);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example here
if (shouldExitNonZero) { |
@@ -33,13 +41,25 @@ describe('sf env compute collaborator add', () => { | |||
); | |||
}); | |||
|
|||
test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add in a failing testing for the --json flag
test | ||
.stdout() | ||
.stderr() | ||
.nock('https://api.heroku.com', (api) => api.post('/salesforce-orgs/collaborators').reply(404, {})) | ||
.command(['env:compute:collaborator:add', '-h', HEROKU_USER]) | ||
.catch((error) => { | ||
expect(error.message).contains(`${herokuColor.heroku(HEROKU_USER)} does not exist.`); | ||
expect(error.message).contains(`Couldn't find Heroku user ${herokuColor.heroku(HEROKU_USER)}.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment about this change. I'm not sure it's needed.
What does this PR do?
Adds JSON support to sf env compute collaborator add, referenced in Elastic Services DX CLI Improvements for 240
What issues does this PR fix or reference?
See above.