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

feat(super-flags): Add GetPath method in superflags #258

Merged
merged 5 commits into from
Mar 10, 2021

Conversation

ahsanbarkati
Copy link
Contributor

@ahsanbarkati ahsanbarkati commented Mar 9, 2021

In super-flags, the file-paths are given within quotes. So the shell is not able to expand the paths having ~ to /home/user/....
This PR adds GetPath() method on super flags which expands the paths having ~ to /home/user/...

For example:
dgraph alpha --acl="secret_file=~/hmac-secret"

the above command throws an error that path doesn't exists even if it exists.


This change is Reviewable

Copy link
Contributor

@karlmcguire karlmcguire left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jarifibrahim, @manishrjain, and @martinmr)

@karlmcguire
Copy link
Contributor

karlmcguire commented Mar 9, 2021

Does this address row #34 in Haqathon sheet? If not, might be a good place to improve that.

@ahsanbarkati
Copy link
Contributor Author

Does this address row #34 in Haqathon sheet? If not, might be a good place to improve that.

If we want to support filenames with semi-colons then we will have to change the separator itself. Not sure if we expect filenames with semi-colons.

z/flags.go Outdated Show resolved Hide resolved
z/flags.go Outdated Show resolved Hide resolved
@ahsanbarkati ahsanbarkati merged commit a4346e5 into master Mar 10, 2021
@ahsanbarkati ahsanbarkati deleted the ahsan/sf-paths branch March 10, 2021 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants