psyinfra / onyo

text-based inventory system on top of git
ISC License
3 stars 5 forks source link

Incorrect YAML format creates errors with unclear message #587

Closed TobiasKadelka closed 1 month ago

TobiasKadelka commented 6 months ago

Incorrect YAML format creates errors with unclear messages, e.g.:

1.

asdfasdf
asdfasdf
adfadsf

leads to:

(onyo) jleo@bnbnb70 in ~/inventory on git:warehouse
❱ onyo new --path spaces/2033 --edit                                                                                           130 !

ERROR: 'str' object has no attribute 'update'
Cancel command (y) or continue editing asset (n)? 
  1. Another YAML format error which has an unclear message is when using tabs (i.e. \t)
TobiasKadelka commented 6 months ago

https://github.com/psyinfra/onyo/issues/436 is another issue about YAML error mesages.