File tree Expand file tree Collapse file tree
Modules/DSCParser/Modules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,6 +127,12 @@ function ConvertTo-DSCObject
127127 throw " DSCParser.CSharp assembly is not loaded. Module initialization failed."
128128 }
129129
130+ # Fully qualify path
131+ if ($PSCmdlet.ParameterSetName -eq ' Path' )
132+ {
133+ $Path = (Resolve-Path - Path $Path ).Path
134+ }
135+
130136 try
131137 {
132138 if ($null -eq $Script :DscResourceCache -and -not $PSBoundParameters.ContainsKey (' DscResourceInfo' ))
@@ -208,6 +214,10 @@ function ConvertFrom-DSCObject
208214 $ChildLevel = 0
209215 )
210216
217+ begin
218+ {
219+ $result = [System.Collections.Generic.List [System.String ]]::new($DSCResources.Count )
220+ }
211221 process
212222 {
213223 if (-not $Script :AssemblyLoaded )
@@ -217,13 +227,16 @@ function ConvertFrom-DSCObject
217227
218228 try
219229 {
220- $result = [DSCParser.CSharp.DscParser ]::ConvertFromDscObject($DSCResources , $ChildLevel )
221- return $result
230+ $result.Add ([DSCParser.CSharp.DscParser ]::ConvertFromDscObject($DSCResources , $ChildLevel ))
222231 }
223232 catch
224233 {
225234 Write-Error " Error converting DSC objects: $_ "
226235 throw
227236 }
228237 }
238+ end
239+ {
240+ return [System.String ]::Join(" " , $result )
241+ }
229242}
You can’t perform that action at this time.
0 commit comments