awsdocs / amazon-emr-release-guide

The open source version of the Amazon EMR Release Guide. You can submit feedback & requests for changes by submitting issues in this repo or by making proposed changes & submitting a pull request.
Other
28 stars 43 forks source link

update bash script to add multiple users #7

Closed msdeep14 closed 5 years ago

msdeep14 commented 6 years ago

Issue #, if available: The command $ curl -XPOST --silent -k https://$(hostname):9443/hub/api/users/$i \ -H "Authorization: token $TOKEN" | jq in the script throws error when run as step. The users will be created successfully and will be able to login to JupyterHub but the step fails with exit code '2' due to jq command, because it expects an argument.

Description of changes: $ curl -XPOST --silent -k https://$(hostname):9443/hub/api/users/$i \ -H "Authorization: token $TOKEN" | jq '.' The argument '.' produces the formatted output without modifying it. It will resolve the issue and step will complete with exit code '0'

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.