Skip to content

Commit f65b956

Browse files
committed
Catch auto_install_packages errors
1 parent 42f07e2 commit f65b956

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

lib/setup-tracer.js

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/setup-tracer.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/setup-tracer.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,12 @@ async function installPythonDeps(codeql: CodeQL) {
158158
return;
159159
}
160160
// Install dependencies
161-
await exec.exec(path.join(scriptsFolder, 'auto_install_packages.py'), [codeql.getDir()]);
162-
161+
try {
162+
await exec.exec(path.join(scriptsFolder, 'auto_install_packages.py'), [codeql.getDir()]);
163+
} catch (e) {
164+
core.endGroup();
165+
throw new Error('We were unable to install your python dependencies. You can call this action with "setup-python-dependencies: false" to disable this process');
166+
}
163167
core.endGroup();
164168
}
165169

0 commit comments

Comments
 (0)