Fail more clearly if the file program is not installed on the runner by mbg · Pull Request #2234 · github/codeql-action (original) (raw)
This PR checks more clearly whether we can successfully find the location of the file program and emits a clearer message in the build log as well as a warning-level diagnostic if it cannot be found. There is also a new integration test which checks that this works as intended.
Since the check for whether the Go workaround is needed takes place before the database gets initialised, this PR also modifies the code for diagnostics to:
- Check if the database exists yet before writing a diagnostic.
- If it does not exist, the diagnostic is added to an array and flushed to disk later once the database is presumed to exist (
initAction only)