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

Enclose file paths in double quotes to capture spaces #2853

Merged
merged 1 commit into from
Apr 21, 2020
Merged

Enclose file paths in double quotes to capture spaces #2853

merged 1 commit into from
Apr 21, 2020

Conversation

paulbalandan
Copy link
Member

Description
The pre-commit hook fails parsing files when the file paths contained spaces. My solution is to enclose the file path $PROJECT/$FILE in double quotes. This solution works with PHP's built-in linter. For Code Sniffer, I can't make it read the enclosed file path as a single file. It still breaks them at the spaces. Perhaps a bug in Code Sniffer? I don't know.

As a workaround, I only passed the relative file paths of the files to phpcbf. Tested locally, and phpcbf can still check the files.

Checklist:

  • Securely signed commits

@lonnieezell lonnieezell merged commit 0cf609e into codeigniter4:develop Apr 21, 2020
@paulbalandan paulbalandan deleted the bugfix/precommit-filepath-spaces branch April 21, 2020 11:49
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 this pull request may close these issues.

2 participants