dockerfilelint
dockerfilelint copied to clipboard
Fix JSON parsing in is_valid_shell() when input is no JSON
is_valid_shell() breaks when you provide an input that is not proper JSON.
SyntaxError: Unexpected number in JSON at position 1
at JSON.parse (<anonymous>)
This PR adds a try/catch to prevent that.
It also adds the unit tests for is_valid_shell() that were missing.