Skip to content

Commit 95673cf

Browse files
committed
Revert "Python-Setup: set PYTHONDONTWRITEBYTECODE=1"
This reverts commit 3ff1fd9.
1 parent 3ff1fd9 commit 95673cf

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/init.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,13 @@ export async function installPythonDeps(codeql: CodeQL, logger: Logger) {
240240
const scriptsFolder = path.resolve(__dirname, "../python-setup");
241241

242242
try {
243-
const env = { ...process.env, PYTHONDONTWRITEBYTECODE: "1" };
244243
if (process.platform === "win32") {
245244
await new toolrunner.ToolRunner(await safeWhich.safeWhich("powershell"), [
246245
path.join(scriptsFolder, "install_tools.ps1"),
247-
], { env: env }).exec();
246+
]).exec();
248247
} else {
249248
await new toolrunner.ToolRunner(
250-
path.join(scriptsFolder, "install_tools.sh"), [], { env: env }
249+
path.join(scriptsFolder, "install_tools.sh")
251250
).exec();
252251
}
253252
const script = "auto_install_packages.py";
@@ -256,19 +255,19 @@ export async function installPythonDeps(codeql: CodeQL, logger: Logger) {
256255
"-3",
257256
path.join(scriptsFolder, script),
258257
path.dirname(codeql.getPath()),
259-
], { env: env }).exec();
258+
]).exec();
260259
} else {
261260
await new toolrunner.ToolRunner(path.join(scriptsFolder, script), [
262261
path.dirname(codeql.getPath()),
263-
], { env: env }).exec();
262+
]).exec();
264263
}
265264
} catch (e) {
266265
logger.endGroup();
267266
logger.warning(
268267
`An error occurred while trying to automatically install Python dependencies: ${e}\n` +
269-
"Please make sure any necessary dependencies are installed before calling the codeql-action/analyze " +
270-
"step, and add a 'setup-python-dependencies: false' argument to this step to disable our automatic " +
271-
"dependency installation and avoid this warning."
268+
"Please make sure any necessary dependencies are installed before calling the codeql-action/analyze " +
269+
"step, and add a 'setup-python-dependencies: false' argument to this step to disable our automatic " +
270+
"dependency installation and avoid this warning."
272271
);
273272
return;
274273
}

0 commit comments

Comments
 (0)