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(serviceaccount create): allow absolute paths when passing custom file location #438

Merged
merged 4 commits into from
Mar 10, 2021

Conversation

craicoverflow
Copy link
Contributor

@craicoverflow craicoverflow commented Mar 9, 2021

Description

fixes #435

This PR does three things:

67a4f08 fixes an error where the user's custom credentials file path was assume to be a relative path and the CLI was converting it from an assumed relative path to an absolute path. The fix removes any modification to the custom path.

b055229 adds a missing --force flag to the serviceaccount reset-credentials command.

cc35b29 lets users pass an environment variable in their file path

Verification Steps

67a4f08

  1. Create a service account with a custom absolute file location:
./rhoas serviceaccount create --name cli-e2e-service-account-auto-test --file-format json --file-location $HOME/file.json --overwrite
  1. The credentials file will save successfully to /home/your-username/file.json

b055229

Run the reset service account command with the --force flag:

./rhoas serviceaccount reset-credentials --id $your-id --file-format json --file-location $HOME/file.json --overwrite --force

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Documentation added for the feature
  • CI and all relevant tests are passing
  • Code Review completed
  • Verified independently by reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to create file with secret when rhoas cli is running as process in java
2 participants