Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
My main problem with the gem is that I lose edits if I make typos when editing data bags and try to save.
This modification allows the user to re-open the editor with the malformed JSON in order to fix it.
Implementation note: in order to get hold of the malformed text, I have substituted use of Chef::Knife::UI#edit_data with a new private method: Chef::Knife::SoloDataBagEdit#edit_text. This changes allows #edit_content to get the actual text returned from the editor, which permits re-editing if it's malformed.