Skip to content

Commit

Permalink
Merge pull request #255 from github/daverlo/guard-python
Browse files Browse the repository at this point in the history
Guard python deps install
  • Loading branch information
Daverlo authored Oct 6, 2020
2 parents 3630a78 + d81cc67 commit b1e2c9b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
13 changes: 8 additions & 5 deletions lib/init-action.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-action.js.map

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

15 changes: 9 additions & 6 deletions src/init-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
installPythonDeps,
runInit,
} from "./init";
import { Language } from "./languages";
import { getActionsLogger } from "./logging";
import { parseRepositoryNwo } from "./repository";

Expand Down Expand Up @@ -118,12 +119,14 @@ async function run() {
logger
);

try {
await installPythonDeps(codeql, logger);
} catch (err) {
logger.warning(
`${err.message} You can call this action with 'setup-python-dependencies: false' to disable this process`
);
if (config.languages.includes(Language.python)) {
try {
await installPythonDeps(codeql, logger);
} catch (err) {
logger.warning(
`${err.message} You can call this action with 'setup-python-dependencies: false' to disable this process`
);
}
}
} catch (e) {
core.setFailed(e.message);
Expand Down

0 comments on commit b1e2c9b

Please sign in to comment.