dockerfilelint icon indicating copy to clipboard operation
dockerfilelint copied to clipboard

Fix JSON parsing in is_valid_shell() when input is no JSON

Open egoexpress opened this issue 5 years ago • 0 comments

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.

egoexpress avatar Jan 17 '21 23:01 egoexpress