Simplify doesGoExtractionOutputExist implementation
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
This commit is contained in:
parent
fff56ee004
commit
e466e75875
3 changed files with 11 additions and 19 deletions
8
lib/analyze-action.js
generated
8
lib/analyze-action.js
generated
|
|
@ -77,13 +77,9 @@ function hasBadExpectErrorInput() {
|
|||
*/
|
||||
function doesGoExtractionOutputExist(config) {
|
||||
const golangDbDirectory = util.getCodeQLDatabasePath(config, languages_1.Language.go);
|
||||
const extractedFiles = fs
|
||||
return fs
|
||||
.readdirSync(golangDbDirectory)
|
||||
.filter((fileName) => fileName.endsWith(".trap") || fileName.endsWith(".trap.gz"));
|
||||
if (extractedFiles.length !== 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
.some((fileName) => fileName.endsWith(".trap") || fileName.endsWith(".trap.gz"));
|
||||
}
|
||||
async function run() {
|
||||
const startedAt = new Date();
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue