UpCloudLtd/upcloud-cli

yaml config parse error handling failure

Closed this issue · 2 comments

Environment (required):

  • macOS (M1)
  • Version 1.0.0

** bad yaml file parsing - unhandled error**
Error: cannot load configuration: While parsing config: yaml: unmarshal errors:
line 1: cannot unmarshal !!str usernam... into map[string]interface {}

To Reproduce
Steps to reproduce the behavior:

  1. Create a config file with username: and password: i.e. without the space.
  2. Marshalling error is displayed. Not all users will be aware of yaml specs to know that space is to be added

Expected behavior
Please let a user know that a space character is expected or provide an example.

Observed behavior
Error message prevents user from running upctl including checking version.

Hi @udaykor , Thanks for the feedback
Yes not all users know the yaml spec but we do provide an example here
And yes maybe the parsing error should be more explicit

@kaminek please feel free to close this issue if the parsing error is handled or to be released