Python-Setup: run auto_install_packages.py with -B flag

This avoids creating a __pycache__ folder in the _actions folder, which
may cause file ownership problems on self-hosted runners
when run in a docker container.
This commit is contained in:
Arthur Baars 2022-06-27 16:38:16 +02:00
parent 95673cf9a2
commit 11a46b8856

View file

@ -253,11 +253,14 @@ export async function installPythonDeps(codeql: CodeQL, logger: Logger) {
if (process.platform === "win32") {
await new toolrunner.ToolRunner(await safeWhich.safeWhich("py"), [
"-3",
"-B",
path.join(scriptsFolder, script),
path.dirname(codeql.getPath()),
]).exec();
} else {
await new toolrunner.ToolRunner(path.join(scriptsFolder, script), [
await new toolrunner.ToolRunner(await safeWhich.safeWhich("python3"), [
"-B",
path.join(scriptsFolder, script),
path.dirname(codeql.getPath()),
]).exec();
}