Skip to content

Clap panics on argument in invalid unicode #262

Description

@remram44

I can understand your library not being designed to handle arguments that are not valid unicode (which are possible on UNIX, and can be valid filenames, but heh), however having your library panic the calling thread is not cool. Please consider using Result instead of crashing.

Reproduce:

echo -e 'r\xE9mi' | xargs target/debug/myprogramusingclap

(note that you can't use cargo run, it can't handle unicode either (but at least it doesn't panic))

Similar to rust-lang/getopts#30; I'm still looking for a safe argument-parsing library 😢

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugC-enhancementCategory: Raise on the bar on expectations

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions