@@ -194,6 +194,15 @@ def main():
194
194
]
195
195
)
196
196
197
+ npm_install_options = [
198
+ click .option (
199
+ "--npm-install-options" ,
200
+ envvar = "RH_NPM_INSTALL_OPTIONS" ,
201
+ default = "" ,
202
+ help = "Options to pass when calling npm install" ,
203
+ )
204
+ ]
205
+
197
206
198
207
def add_options (options ):
199
208
"""Add extracted common options to a click command"""
@@ -319,13 +328,14 @@ def build_npm(package, dist_dir):
319
328
320
329
@main .command ()
321
330
@add_options (dist_dir_options )
331
+ @add_options (npm_install_options )
322
332
@use_checkout_dir ()
323
- def check_npm (dist_dir ):
333
+ def check_npm (dist_dir , npm_install_options ):
324
334
"""Check npm package"""
325
335
if not osp .exists ("./package.json" ):
326
336
util .log ("Skipping check-npm since there is no package.json file" )
327
337
return
328
- npm .check_dist (dist_dir )
338
+ npm .check_dist (dist_dir , npm_install_options )
329
339
330
340
331
341
@main .command ()
@@ -434,10 +444,11 @@ def delete_release(auth, release_url):
434
444
@add_options (auth_options )
435
445
@add_options (dist_dir_options )
436
446
@add_options (dry_run_options )
447
+ @add_options (npm_install_options )
437
448
@click .argument ("release-url" , nargs = 1 )
438
- def extract_release (auth , dist_dir , dry_run , release_url ):
449
+ def extract_release (auth , dist_dir , dry_run , release_url , npm_install_options ):
439
450
"""Download and verify assets from a draft GitHub release"""
440
- lib .extract_release (auth , dist_dir , dry_run , release_url )
451
+ lib .extract_release (auth , dist_dir , dry_run , release_url , npm_install_options )
441
452
442
453
443
454
@main .command ()
0 commit comments