ps-analysis-tool icon indicating copy to clipboard operation
ps-analysis-tool copied to clipboard

Standardize the error for -v parameter and guide user in case of confusion

Open fellyph opened this issue 1 year ago • 0 comments

Describe the bug Running the CLI command psat -v the CLI triggers the following error:

Some errors occurred while analyzing the website.
For more information, check the stack trace below:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

It is common to get confused between -V(version) and -v(verbose) and run -v as the first parameter, the error message should follow the same standard as the other message, and if that case happens suggest use -V instead -v.

Screenshot 2024-09-25 at 14 52 47

To Reproduce Steps to reproduce the behavior:

  1. Go to the terminal and run psat -v
  2. See the error

Expected behavior Displays a standard message and guides the user in case of confusion

Desktop (please complete the following information):

  • OS: MacOS
  • Version PSAT CLI 0.11

fellyph avatar Sep 25 '24 14:09 fellyph