Describe the bug
When the hadolint binary is missing execution permissions or is just missing completely, the extension blows up with hadolint: Cannot read properties of null (reading 'toString'). A more helpful error message could be more user friendly.
To Reproduce
Steps to reproduce the behavior:
Download the hadolint 2.10.0 binary into your $PATH
Try to lint a Dockerfile
Error
Grant execute permissions on hadolint binary
Lint Dockerfle
Works
Expected behaviour
I would expect the extension to tell me that something went wrong when executing the hadolint binary, instead of blowing up internally.
Environment and version (please complete the following information):
hadolint: Haskell Dockerfile Linter 2.10.0
OS: Ubuntu 20.04
Debug information
Provide all output from hadolint (in the output console) while having an opened Dockerfile in VS Code.
It should produce something like this
[hadolint(1003) file:///workspace] Started and initialize received
[hadolint(1003) file:///workspace] Document is opened: file:///workspace/Dockerfile.prod
[hadolint(1003) file:///workspace] Document is changed: file:///workspace/Dockerfile.prod
[hadolint(1003) file:///workspace] Current settings: {"hadolintPath":"/home/user/.bin/hadolint","cliOptions":["--no-color"],"maxNumberOfProblems":100,"outputLevel":"warning"}
[hadolint] Running /home/user/.bin/hadolint /workspace/Dockerfile.prod --no-color in /workspace
Describe the bug When the hadolint binary is missing execution permissions or is just missing completely, the extension blows up with
hadolint: Cannot read properties of null (reading 'toString')
. A more helpful error message could be more user friendly.To Reproduce Steps to reproduce the behavior:
Expected behaviour I would expect the extension to tell me that something went wrong when executing the hadolint binary, instead of blowing up internally.
Environment and version (please complete the following information):
Debug information
Provide all output from
hadolint
(in the output console) while having an openedDockerfile
in VS Code.It should produce something like this
Additional context