Skip to content

Commit b1e2c9b

Browse files
authored
Merge pull request #255 from github/daverlo/guard-python
Guard python deps install
2 parents 3630a78 + d81cc67 commit b1e2c9b

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

lib/init-action.js

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.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/init-action.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
installPythonDeps,
1111
runInit,
1212
} from "./init";
13+
import { Language } from "./languages";
1314
import { getActionsLogger } from "./logging";
1415
import { parseRepositoryNwo } from "./repository";
1516

@@ -118,12 +119,14 @@ async function run() {
118119
logger
119120
);
120121

121-
try {
122-
await installPythonDeps(codeql, logger);
123-
} catch (err) {
124-
logger.warning(
125-
`${err.message} You can call this action with 'setup-python-dependencies: false' to disable this process`
126-
);
122+
if (config.languages.includes(Language.python)) {
123+
try {
124+
await installPythonDeps(codeql, logger);
125+
} catch (err) {
126+
logger.warning(
127+
`${err.message} You can call this action with 'setup-python-dependencies: false' to disable this process`
128+
);
129+
}
127130
}
128131
} catch (e) {
129132
core.setFailed(e.message);

0 commit comments

Comments
 (0)