Skip to content

Commit

Permalink
Merge pull request #9 from perl-actions/verbose-arg
Browse files Browse the repository at this point in the history
Disable -v and add verbose option to control it
  • Loading branch information
atoomic authored Nov 5, 2020
2 parents df25db9 + d5fa13a commit 8399ceb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ Which perl path to use. Default to use `perl` from the current `PATH`.

Where to install `cpm`. Default value is `$Config{installsitescript}/cpm`.

### `verbose`

Boolean variable used to control the `-v` flag
Possible values: true | false [default: false]

Note: this was previously set to true by default,
this is now disabled to speedup installations.

### `version`

Which version/tag of `cpm` to install. Default is 'master' to use the latest version.
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ inputs:
required: false
default: true

verbose:
description: "Run cpm with -v flag or not"
required: false
default: false

perl:
description: "Path of perl to use default to currtent PATH"
required: false
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ async function run() {
const tests = core.getInput("tests");
const dash_g = core.getInput("global");
const args = core.getInput("args");
const verbose = core.getInput("verbose");

const w_tests = is_true(tests) ? "--test" : "--no-test";
var w_args = [];
Expand All @@ -115,9 +116,12 @@ async function run() {
cpm_location,
"install",
"--show-build-log-on-failure",
"-v",
w_tests,
];

if (is_true(verbose)) {
CMD_install.push("-v");
}
if (is_true(dash_g)) {
CMD_install.push("-g");
}
Expand Down

0 comments on commit 8399ceb

Please sign in to comment.