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

git secret hide throws an error if using directory path containing a folder with a space #1018

Open
rhill86 opened this issue Aug 9, 2023 · 0 comments

Comments

@rhill86
Copy link

rhill86 commented Aug 9, 2023

What are the steps to reproduce this issue?

  1. Ensure project is in a directory path that has a folder with a space in it.
    e.g. /mnt/c/Users/User Name/Documents/workspace/project. (i.e. in this path we have a folder called User Name)
  2. In project run git secret reveal -> it works fine
  3. Run git secret hide command and error is thrown

What happens?

Error thrown is: gawk: cmd. line:2: fatal: cannot open file `/mnt/c/Users/User' for reading: No such file or directory
Looks like it doesn't get the full path for the directory. It stops at the first space in the path name.

What were you expecting to happen?

Expecting files to be hidden with no errors:
git-secret: done. 7 of 7 files are hidden.

Any logs, error output, etc?

gawk: cmd. line:2: fatal: cannot open file `/mnt/c/Users/User' for reading: No such file or directory

Any other comments?

If we move the project into a directory path that does not have folders with a space in it, it works perfectly e.g. /mnt/c/project.

What versions of software are you using?

Operating system: (uname -a) …
Running Ubuntu 22.0.4 LTS on WSL on Windows 11.

git-secret path: (which git-secret) …
/usr/bin/git

git-secret version: (git secret --version) …
0.4.0

git version: (git --version) …
git version 2.34.1

Shell type and version: ($SHELL --version) …
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)

gpg version: (gpg --version) …
gpg (GnuPG) 2.2.27

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

No branches or pull requests

1 participant