Skip to content

Commit

Permalink
Add call to py
Browse files Browse the repository at this point in the history
  • Loading branch information
David Verdeguer committed Oct 8, 2020
1 parent 735ec7d commit e3d2d4a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
14 changes: 13 additions & 1 deletion 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
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,18 @@ export async function installPythonDeps(codeql: CodeQL, logger: Logger) {

// Install dependencies
try {
await new toolrunnner.ToolRunner(
path.join(scriptsFolder, "auto_install_packages.py"),
[path.dirname(codeql.getPath())]
).exec();
const script = "auto_install_packages.py";
if (process.platform === "win32") {
await new toolrunnner.ToolRunner("py", [
"-3",
path.join(scriptsFolder, script),
path.dirname(codeql.getPath()),
]).exec();
} else {
await new toolrunnner.ToolRunner(path.join(scriptsFolder, script), [
path.dirname(codeql.getPath()),
]).exec();
}
} catch (e) {
logger.endGroup();
logger.warning(
Expand Down

0 comments on commit e3d2d4a

Please sign in to comment.