Skip to content

Commit

Permalink
Add parameter to install plugins
Browse files Browse the repository at this point in the history
Fixes #22
  • Loading branch information
julianwachholz committed Sep 23, 2021
1 parent a61bd56 commit 5860291
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ inputs:
description: "Path to use for flake8"
default: "."
required: false
plugins:
description: "Package names of flake8 plugins passed on to the `pip install` command."
default: ""
required: false
config:
description: "Specify a config file for flake8"
required: false
Expand Down
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const parseFlake8Output = __nccwpck_require__(586);
const { GITHUB_TOKEN } = process.env;

async function installFlake8() {
await exec.exec("pip install flake8");
const plugins = core.getInput("plugins");
await exec.exec(`pip install flake8 ${plugins}`);
}

async function runFlake8() {
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const parseFlake8Output = require("./parser");
const { GITHUB_TOKEN } = process.env;

async function installFlake8() {
await exec.exec("pip install flake8");
const plugins = core.getInput("plugins");
await exec.exec(`pip install flake8 ${plugins}`);
}

async function runFlake8() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flake8-action",
"version": "2.0.1",
"version": "2.0.2",
"description": "Flake8 GitHub Action",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 5860291

Please sign in to comment.