mirror of
https://github.com/github/codeql-action
synced 2026-05-25 15:00:36 +03:00
Install python deps on init
This commit is contained in:
Generated
+24
@@ -119,4 +119,28 @@ async function injectWindowsTracer(processName, processLevel, config, codeql, tr
|
||||
], { env: { 'ODASA_TRACER_CONFIGURATION': tracerConfig.spec } }).exec();
|
||||
}
|
||||
exports.injectWindowsTracer = injectWindowsTracer;
|
||||
async function installPythonDeps(codeql, logger) {
|
||||
logger.startGroup('Setup Python dependencies');
|
||||
const scriptsFolder = path.resolve(__dirname, '../python-setup');
|
||||
// Setup tools
|
||||
try {
|
||||
await new toolrunnner.ToolRunner(path.join(scriptsFolder, 'install_tools.sh')).exec();
|
||||
}
|
||||
catch (e) {
|
||||
// This script tries to install some needed tools in the runner. It should not fail, but if it does
|
||||
// we just abort the process without failing the action
|
||||
logger.endGroup();
|
||||
throw new Error('Unable to download and extract the scripts needed for installing the python dependecies');
|
||||
}
|
||||
// Install dependencies
|
||||
try {
|
||||
await new toolrunnner.ToolRunner(path.join(scriptsFolder, 'auto_install_packages.py'), [path.dirname(codeql.getPath())]).exec();
|
||||
}
|
||||
catch (e) {
|
||||
logger.endGroup();
|
||||
throw new Error('We were unable to install your python dependencies.');
|
||||
}
|
||||
logger.endGroup();
|
||||
}
|
||||
exports.installPythonDeps = installPythonDeps;
|
||||
//# sourceMappingURL=init.js.map
|
||||
Reference in New Issue
Block a user