Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when the YAML config file is empty #728

Open
adityasharad opened this issue Sep 3, 2021 · 0 comments
Open

Improve error message when the YAML config file is empty #728

adityasharad opened this issue Sep 3, 2021 · 0 comments

Comments

@adityasharad
Copy link
Contributor

Using the Runner with --config-file <path to an empty file> leads to the following error. Looking at the code I expect the same applies to the Action.
This is admittedly an unusual case, but it has appeared in at least one support request, so we should provide a more helpful warning and carry on, rather than crashing.

TypeError: Cannot use 'in' operator to search for 'name' in undefined
    at loadConfig (/snapshot/dist/codeql-runner.js)
    at Object.initConfig (/snapshot/dist/codeql-runner.js)
    at Object.initConfig (/snapshot/dist/codeql-runner.js)
    at Command.<anonymous> (/snapshot/dist/codeql-runner.js)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant