File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,19 @@ Possible values: true | false [default: false]
78
78
79
79
# ## `args`
80
80
81
- Extra arguments to pass to the cpanm command line.
81
+ Extra arguments to pass to the cpanm command line used by `install` or `cpanfile` .
82
82
83
83
example :
84
-
85
84
` ` ` yaml
86
85
args: "-L vendor"
87
86
` ` `
88
87
88
+ You can also use this option to run your own flavor
89
+ without the need of setting `install` or `cpanfile`.
90
+ ` ` ` yaml
91
+ args: "--installdeps ."
92
+ ` ` `
93
+
89
94
# ## `sudo`
90
95
91
96
Run commands as sudo : true | false [default: true]
Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ async function run() {
115
115
CMD_install = CMD_install . concat ( w_args ) ;
116
116
}
117
117
118
+ var has_run = false ;
119
+
118
120
/* install one ore more modules */
119
121
if ( install !== null && install . length ) {
120
122
// install one or more modules
@@ -124,6 +126,7 @@ async function run() {
124
126
var cmd = [ ...CMD_install ] ; /* clone array */
125
127
cmd = cmd . concat ( list ) ;
126
128
129
+ has_run = true ;
127
130
await do_exec ( cmd ) ;
128
131
}
129
132
@@ -136,6 +139,16 @@ async function run() {
136
139
137
140
var cmd = [ ...CMD_install ] ;
138
141
cmd . push ( "--cpanfile" , cpanfile_full_path , "--installdeps" , "." ) ;
142
+
143
+ has_run = true ;
144
+ await do_exec ( cmd ) ;
145
+ }
146
+
147
+ /* custom run with args */
148
+ if ( has_run === false && w_args . length ) {
149
+ console . log ( `custom run with args` ) ;
150
+ var cmd = [ ...CMD_install ] ;
151
+ has_run = true ;
139
152
await do_exec ( cmd ) ;
140
153
}
141
154
You can’t perform that action at this time.
0 commit comments