Skip to content

Commit

Permalink
Showing 3 changed files with 23 additions and 9 deletions.
14 changes: 10 additions & 4 deletions lib/init.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/init.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions src/init.ts
@@ -186,21 +186,29 @@ export async function injectWindowsTracer(
export async function installPythonDeps(codeql: CodeQL, logger: Logger) {
logger.startGroup("Setup Python dependencies");

if (process.platform !== "linux") {
if (process.platform === "darwin") {
logger.info(
"Currently, auto-installing python dependancies is only supported on linux"
"Currently, auto-installing python dependancies is not supported on MacOS"
);
logger.endGroup();
return;
}

let install_tools_script = "install_tools.sh";
let auto_install_packages_script = "auto_install_packages.py";

if (process.platform === "win32") {
install_tools_script = "install_tools.ps1";
auto_install_packages_script = "auto_install_packages_windows.py";
}

const scriptsFolder = path.resolve(__dirname, "../python-setup");

// Setup tools on the Github hosted runners
if (process.env["ImageOS"] !== undefined) {
try {
await new toolrunnner.ToolRunner(
path.join(scriptsFolder, "install_tools.sh")
path.join(scriptsFolder, install_tools_script)
).exec();
} catch (e) {
// This script tries to install some needed tools in the runner. It should not fail, but if it does
@@ -215,7 +223,7 @@ export async function installPythonDeps(codeql: CodeQL, logger: Logger) {
// Install dependencies
try {
await new toolrunnner.ToolRunner(
path.join(scriptsFolder, "auto_install_packages.py"),
path.join(scriptsFolder, auto_install_packages_script),
[path.dirname(codeql.getPath())]
).exec();
} catch (e) {

0 comments on commit 0f2fa46

Please sign in to comment.