Skip to content

Validate command line arguments at startup #5

@tbarusseau

Description

@tbarusseau

When running git cm with a misspelled/completely wrong argument on the command line, it only fails at the very end:

$ git cm woops!
✔ Select the type of change that you're committing: · perf: A code change that improves performance
✔ Denote the scope of this change (compiler, runtime, stdlib, etc.): · 
✔ Write a short, imperative tense description of the change: · 
✔ Provide a longer description of the change: · 
✔ Are there any breaking changes? · no
✔ Does this change affect any open issues? · no
thread 'main' panicked at 'Failed to open git repository: Error { code: -3, klass: 2, message: "failed to resolve path \'woops!\': No such file or directory" }', /home/tbarusseau/.cargo/registry/src/github.com-1ecc6299db9ec823/git-cm-0.1.1/src/git.rs:79:16
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It should fail at the very beginning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions