Skip to content

Commit 2d7c627

Browse files
authored
Merge pull request #6 from perl-actions/verbose-arg
Option to disable -v from cpanm
2 parents 063ee24 + 1aeaa8b commit 2d7c627

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ Install modules from a cpanfile.
7676
Boolean variable used to disable unit tests during installation
7777
Possible values: true | false [default: false]
7878

79+
### `verbose`
80+
81+
Boolean variable used to control the `-v` flag
82+
Possible values: true | false [default: false]
83+
84+
Note: this was previously set to true by default,
85+
this is now disabled to speedup installations.
86+
7987
### `args`
8088

8189
Extra arguments to pass to the cpanm command line.

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ inputs:
1818
required: false
1919
default: false
2020

21+
verbose:
22+
description: "Add -v to cpanm"
23+
required: false
24+
default: false
25+
2126
args:
2227
description: "Extra args used passed to install command"
2328
required: false

index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ async function run() {
9797
const tests = core.getInput("tests");
9898
const dash_g = core.getInput("global");
9999
const args = core.getInput("args");
100+
const verbose = core.getInput("verbose");
100101

101102
const w_tests = is_true(tests) ? null : "--notest";
102103
var w_args = [];
@@ -106,7 +107,12 @@ async function run() {
106107
}
107108

108109
/* base CMD_install command */
109-
var CMD_install = [PERL, cpanm_location, "-v"];
110+
var CMD_install = [PERL, cpanm_location];
111+
112+
if (is_true(verbose)) {
113+
CMD_install.push("-v");
114+
}
115+
110116
if (w_tests != null) {
111117
CMD_install.push(w_tests);
112118
}

0 commit comments

Comments
 (0)