fix win_updates failure with dict-typed args (#26208)

Switch to dicts in common code caused silent failures during arg translation, so default values and non-check-mode were always used.
* fixes #23653
* fixes #24062
* fixes #22938
* fixes #25156
This commit is contained in:
Matt Davis 2017-06-28 16:36:53 -07:00 committed by GitHub
parent a2f38de173
commit 69de9d86bd

View file

@ -405,9 +405,7 @@ $common_inject = {
# source the common code into the current scope so we can call it
. $common_inject
$parsed_args = Parse-Args $args $true
# grr, why use PSCustomObject for args instead of just native hashtable?
$parsed_args.psobject.properties | foreach -begin {$job_args=@{}} -process {$job_args."$($_.Name)" = $_.Value} -end {$job_args}
$job_args = Parse-Args $args $true
# set the log_path for the global log function we injected earlier
$log_path = $job_args['log_path']