You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improves error handling during initial environment setup for the CDS
extractor. Ensures that error codes are used when exiting due to an
error in the configuration of the CDS extractor.
Minor refactoring of index-files.ts script in order to migrate
environment setup tasks to dedicated functions with associated unit
tests.
Migrates response-file checking and related logic to a dedicated
'getCdsFilePathsToProcess` function, which also helps to prepare for
dropping the "index-files" approach in favor of an "autobuild" based
approach.
`'${codeqlExe} database index-files --language cds' terminated early as response file '${responseFile}' is empty. This is because no CDS files were selected or found.`,
} database index-files --language cds' terminated early as response file '${responseFile}' is empty. This is because no CDS files were selected or found.`,
60
+
};
61
+
}
62
+
63
+
return{
64
+
success: true,
65
+
cdsFilePaths: cdsFilePathsToProcess,
66
+
};
67
+
}catch(err){
68
+
return{
69
+
success: false,
70
+
cdsFilePaths: [],
71
+
errorMessage: `'${
72
+
platformInfo.isWindows ? 'codeql.exe' : 'codeql'
73
+
} database index-files --language cds' terminated early as response file '${responseFile}' could not be read due to an error: ${String(err)}`,
74
+
};
75
+
}
20
76
}
21
77
22
78
/**
@@ -72,3 +128,21 @@ export function recursivelyRenameJsonFiles(dirPath: string): void {
72
128
}
73
129
}
74
130
}
131
+
132
+
/**
133
+
* Validate a response file exists and can be read
134
+
* @param responseFile Path to the response file
135
+
* @returns Object containing success status and error message if any
0 commit comments