Skip to content

.cfignore fails silently in non-UTF8 encodings #281

Closed
@jkillian

Description

@jkillian

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions