caderek / gramma

command-line grammar checker
https://caderek.github.io/gramma/
ISC License
251 stars 18 forks source link

The output of the command "gramma check" with no argument contains a stack trace #6

Closed DevSilv closed 5 years ago

DevSilv commented 5 years ago

Steps to reproduce

  1. Run the application with the following command:
    gramma check
  2. The output contains a stack trace, starting with the following:
    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
    ...

Suggestion

I do not consider this as a bug or an invalid behavior (it may be indeed the expected behavior). But in general, I think that there is no point to print such an information to a non-developer.

Instead, there might be added a flag -d/--debug which would enable all commands to print stack traces in case of ~a failure~ particular failures.

caderek commented 5 years ago

Fixed with: https://github.com/caderek/gramma/commit/409388f893a9fa9d90d66da199b6f96ca3d7861a#diff-d9d9214113dea1c364abd4ba3c70be11R45

Thank you!