Skip to content

ConvertTo-DscObject hangs  #16

@SebastianGoers

Description

@SebastianGoers

Using ConvertTo-DscObject with PS 5.1 hangs due to an infinite loop in the code. I believe the issue results from

while ($parsedData[$newIndexPosition].Type -ne 'Keyword')
as in the while statement $i gets incremented which is also used in the for loop
for ($i = 0; $i -lt $parsedData.Count; $i++)
and thus the for-loop never terminates. Also, there seems to be a change in the actual behavior in PS. It is documented here: #15.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions