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

reveal command is failed in the sub directory #903

Closed
ochanism opened this issue Jul 19, 2022 · 3 comments · Fixed by #905
Closed

reveal command is failed in the sub directory #903

ochanism opened this issue Jul 19, 2022 · 3 comments · Fixed by #905

Comments

@ochanism
Copy link
Contributor

ochanism commented Jul 19, 2022

#751
This PR produced this bug.

  • How to reproduce
$ git init
Initialized empty Git repository in /home/jayden/Workspace/opensource/test/.git/

$ git-secret init
git-secret: init created: '/home/jayden/Workspace/opensource/test/.gitsecret/'

$ git-secret tell test@test.com
gpg: keybox '/home/jayden/Workspace/opensource/test/.gitsecret/keys/pubring.kbx' created
gpg: /home/jayden/Workspace/opensource/test/.gitsecret/keys/trustdb.gpg: trustdb created
git-secret: done. test@test.com added as user(s) who know the secret.

$ touch aaa  

$ git-secret add aaa
git-secret: file not in .gitignore, adding: aaa
git-secret: 1 item(s) added.

$ git-secret hide
git-secret: done. 1 of 1 files are hidden.

# `reveal` worked well in the git repo root directory.
$ git-secret reveal
File '/home/jayden/Workspace/opensource/test/aaa' exists. Overwrite? (y/N) y
git-secret: done. 1 of 1 files are revealed.

$ mkdir subdir

$ cd subdir 

# `reveal` failed in the subdir.
$ git-secret reveal
git-secret: abort: cannot find file to decrypt: /home/jayden/Workspace/opensource/test/subdir/aaa.secret

The file path should be /home/jayden/Workspace/opensource/test/aaa.secret instead of /home/jayden/Workspace/opensource/test/subdir/aaa.secret.

ochanism added a commit to ochanism/git-secret that referenced this issue Jul 19, 2022
@ochanism
Copy link
Contributor Author

@sobolevn
I've made a patch for this bug.
ochanism@306fa6f

If this is acceptable, I'll make a PR.

@sobolevn
Copy link
Owner

Please, do :)

ochanism added a commit to ochanism/git-secret that referenced this issue Jul 19, 2022
ochanism added a commit to ochanism/git-secret that referenced this issue Jul 19, 2022
@ochanism
Copy link
Contributor Author

Please review this PR: #905
I hope it would be released asap because I've been suffering from this bug. 😄

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 a pull request may close this issue.

2 participants