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

.cfignore fails silently in non-UTF8 encodings #281

Closed
jkillian opened this issue Oct 31, 2014 · 3 comments
Closed

.cfignore fails silently in non-UTF8 encodings #281

jkillian opened this issue Oct 31, 2014 · 3 comments

Comments

@jkillian
Copy link

If a .cfignore file is in an encoding other than UTF8, the CLI tool fails to read it properly and the files that should be ignored are uploaded with no indications that anything is wrong.

For example, on Windows, if a developer runs:

echo node_modules > .cfignore

the resulting file will by default be in an encoding other than UTF8. It's quite confusing for developers on Windows to figure out then why their .cfignore isn't being respected.

I realize this isn't an easy problem to fix, especially for Unicode files without a BOM. But perhaps we could at least look for some of the more common symptoms of different encodings and print out a warning message if they show up?

For example, say a user accidentally has a UTF16 .cfignore. The CLI could notice the unusual presence of lots of null bytes and print out a warning: "Warning: .cfignore file may be encoded in UTF16 and might not work properly."

Also see https://developer.ibm.com/answers/questions/29227/why-is-cf-push-choking-on-a-file-thats-in-cfignore.html

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/81869448.

@goehmen
Copy link
Contributor

goehmen commented Dec 2, 2014

@jkillian Thanks for raising this issue. The CF CLI team agreed with you but couldn't find a 100% accurate way to confirm encoding of a file across all supported platforms. We've acknowledged that this is a known issue and added a new section to the CLI's github readme.md file to accomodate this it is in Known issues section under Troubleshooting/FAQs.

@goehmen goehmen closed this as completed Dec 2, 2014
@jkillian
Copy link
Author

jkillian commented Dec 4, 2014

Agreed, I couldn't think up any pretty solutions either. Seems like a reasonable resolution to me, thanks for looking into it

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

3 participants