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

Error if the file name includes a single quote #85

Open
Leandros opened this issue Jan 11, 2018 · 0 comments
Open

Error if the file name includes a single quote #85

Leandros opened this issue Jan 11, 2018 · 0 comments

Comments

@Leandros
Copy link

The arguments to git are quoted in single quotes to allow file names with spaces, but this proves a problem, since files with ' in their names are now producing an error (for the imaginary file This doesn't work.txt):

Error: Could not run 'git --git-dir='/Users/redacted/workspace/redacted/.git' --work-tree='/Users/redacted/workspace/redacted' show master:'redacted/redacted/redacted/This doesn't work.txt' | LC_ALL=C file --mime-type -' => sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `git --git-dir='/Users/redacted/workspace/redacted/.git' --work-tree='/Users/redacted/workspace/redacted' show master:'redacted/redacted/redacted/This doesn't work.txt' | LC_ALL=C file --mime-type -'.
Try --help for help.
@Leandros Leandros changed the title Error if the file name includes a ' Error if the file name includes a single quote Jan 11, 2018
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