@@ -328,13 +328,24 @@ function Get-PackageNamesFromInvocationLine {
328
328
# we somehow need to know what parameters are named and can take a value
329
329
# - if we don't know, the parameter's value will be treated as package name
330
330
$namedParameters = @ (" force:" , # -force:$bool is a zebra
331
- " s" , " source" ,
332
- " ia" , " installargs" , " installarguments" ,
333
- " params" , " parameters" , " pkgparameters" , " packageparameters" ,
334
- " cp" ,
331
+ " s" , " source" ,
332
+ " log-file" ,
333
+ " version" ,
334
+ " ia" , " installargs" , " installarguments" , " install-arguments" ,
335
+ " override" , " overrideargs" , " overridearguments" , " override-arguments" ,
336
+ " params" , " parameters" , " pkgparameters" , " packageparameters" , " package-parameters" ,
337
+ " user" , " password" , " cert" , " cp" , " certpassword" ,
335
338
" checksum" , " downloadchecksum" , " checksum64" , " checksumx64" , " downloadchecksumx64" ,
336
- " checksumtype" , " checksum-type" , " downloadchecksumtyp" ,
337
- " checksumtype64" , " checksumtypex64" , " checksum-type-x64" , " downloadchecksumtypex64" )
339
+ " checksumtype" , " checksum-type" , " downloadchecksumtype" ,
340
+ " checksumtype64" , " checksumtypex64" , " checksum-type-x64" , " downloadchecksumtypex64" ,
341
+ " timeout" , " execution-timeout" ,
342
+ " cache" , " cachelocation" , " cache-location" ,
343
+ " proxy" , " proxy-user" , " proxy-password" , " proxy-bypass-list" ,
344
+ " viruspositivesmin" , " virus-positives-minimum" ,
345
+ " install-arguments-sensitive" , " package-parameters-sensitive" ,
346
+ " dir" , " directory" , " installdir" , " installdirectory" , " install-dir" , " install-directory" ,
347
+ " bps" , " maxdownloadrate" , " max-download-rate" , " maxdownloadbitspersecond" , " max-download-bits-per-second" ,
348
+ " maximumdownloadbitspersecond" , " maximum-download-bits-per-second" )
338
349
339
350
$skipNext = $false
340
351
foreach ($a in $InvocationArguments ) {
@@ -379,18 +390,18 @@ function Get-PassedArg {
379
390
$nextIsValue = $false
380
391
$val = $null
381
392
382
- $OriginalArgs | Foreach-Object {
393
+ foreach ( $a in $OriginalArgs ) {
383
394
if ($nextIsValue ) {
384
395
$nextIsValue = $false
385
- $val = $_
386
- return
396
+ $val = $a
397
+ break ;
387
398
}
388
399
389
- if ($candidateKeys -contains $_ ) {
400
+ if ($candidateKeys -contains $a ) {
390
401
$nextIsValue = $true
391
402
}
392
- elseif ($_ .ToString ().Contains(" =" )) {
393
- $parts = $_ .split (" =" , 2 )
403
+ elseif ($a .ToString ().Contains(" =" )) {
404
+ $parts = $a .split (" =" , 2 )
394
405
$nextIsValue = $false
395
406
$val = $parts [1 ]
396
407
}
0 commit comments