Closed julianwood closed 1 year ago
Moving this to track separately. @swordfish291 What OS/pwsh are you running this on? What is not able to read the file? IDE, or Lambda runtime?
Both. IDE shows weiredly formatted data and Lambda fails to execute.
I have the same issue.
I've pushed an update to the build script to add -Encoding UTF8
. It seems Windows PowerShell and PowerShell 7 have different defaults.
Feel free to validate before we close this...
Validated. Worrking as expected in Windows PowerShell and PowerShell core.
This can be closed.
Another issue that I observed is that the Out-File messes up the encoding of the pwsh-runtime.psm1. I am not sure if anyone has observed this but I tested this on two machines and it ended up making the file unreadable. Adding -Encoding UTF8 with Out-File solved the problem.
Originally posted by @swordfish291 in https://github.com/awslabs/aws-lambda-powershell-runtime/issues/11#issuecomment-1407569014