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(super-flags): Use GetPath for path arguments in superflags #7541

Merged
merged 2 commits into from
Mar 11, 2021

Conversation

ahsanbarkati
Copy link
Contributor

@ahsanbarkati ahsanbarkati commented Mar 10, 2021

Use Getpath() method for path arguments in the super-flags.
GetPath() handles the path in a right way. It does two things more than what GetString() does.

  1. It resolves ~ to /home/user
  2. It cleans up the path to shortest absolute path.

Flags affected by this PR

Zero

  • --audit
    • encrypt-file
    • output
  • --tls
    • ca-cert
    • client-cert
    • client-key
    • server-cert
    • server-key

Alpha

  • --acl

    • secret-file
  • --audit

    • encrypt-file
    • output
  • --cdc

    • ca-cert
    • client-cert
    • client-key
    • file
  • --tls

    • ca-cert
    • client-cert
    • client-key
    • server-cert
    • server-key
  • --vault

    • path
    • role-id-file
    • secret-id-file

Bulk, Live and Restore

  • --tls

    • ca-cert
    • client-cert
    • client-key
  • --vault

    • path
    • role-id-file
    • secret-id-file

This change is Reviewable

@github-actions github-actions bot added the area/enterprise Related to proprietary features label Mar 10, 2021
Copy link
Contributor

@aman-bansal aman-bansal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 0 of 7 files reviewed, all discussions resolved (waiting on @manishrjain and @vvbalaji-dgraph)

@ahsanbarkati ahsanbarkati merged commit 06922a1 into release/v21.03 Mar 11, 2021
@ahsanbarkati ahsanbarkati deleted the ahsan/superflag-paths branch March 11, 2021 09:08
aman-bansal pushed a commit that referenced this pull request Mar 15, 2021
Use GetPath() instead of GetString() for path superflags. GetPath()
correctly resolves the path by expanding `~` to /home/user and also
resolves relative paths like `./` or `../abc` etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/enterprise Related to proprietary features
Development

Successfully merging this pull request may close these issues.

2 participants