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]
7878
7979# ## `args`
8080
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` .
8282
8383example :
84-
8584` ` ` yaml
8685args: "-L vendor"
8786` ` `
8887
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+
8994# ## `sudo`
9095
9196Run commands as sudo : true | false [default: true]
Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ async function run() {
115115 CMD_install = CMD_install . concat ( w_args ) ;
116116 }
117117
118+ var has_run = false ;
119+
118120 /* install one ore more modules */
119121 if ( install !== null && install . length ) {
120122 // install one or more modules
@@ -124,6 +126,7 @@ async function run() {
124126 var cmd = [ ...CMD_install ] ; /* clone array */
125127 cmd = cmd . concat ( list ) ;
126128
129+ has_run = true ;
127130 await do_exec ( cmd ) ;
128131 }
129132
@@ -136,6 +139,16 @@ async function run() {
136139
137140 var cmd = [ ...CMD_install ] ;
138141 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 ;
139152 await do_exec ( cmd ) ;
140153 }
141154
You can’t perform that action at this time.
0 commit comments