Closed 1ict closed 3 years ago
seems to be something weird with my psparser! downgraded to pwsh 7.0.3 but keep getting the same result . on other machines i get correct results need more investigation on my part.
turned out microsoft365dsc didnt load completely in pwsh7, really thought it was :) my bad
ConvertTo-DSCObject hangs on endless loop on Powershell 7.1.1
ConvertTo-DSCObject, from line 81 :
Loops endlessly because there's no more 'Keyword' tokens
The PSParser in Powershell 7.1.1 gives different tokentypes for some tokens. (not sure if this is a bug or intentionally, https://github.com/PowerShell/PowerShell/pull/13779 is the only change i found involving the parser in recent releases)
the DSC Resource on this page : http://nikcharlebois.com/cloud-lcm-prototype-for-dsc-as-a-service/ gives these token types (just listed the ones that are different in pre-7.1.1 and 7.1.1)
Again not sure if it should be fixed here... But it should atleast throw an error if $i becomes larger than $parsedData.Count to prevent an endless loop