Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build-PSBuildModule Compile UTF-8 File #71

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

HeyItsGilbert
Copy link
Member

We attempt to append UTF-8 encodings later, but the initial file isn't set to that. This should fix it.

Description

When building a compiled module it was observed that the the Meta tests to check for UTF-8 was filing on the newly created psm1. This fix sets the intial file to be utf-8 encoded.

Running tests from 'Meta.tests.ps1'
WARNING: File 
D:\actions-runner\_work\InternalModule\InternalModule\Output\InternalModule\0.7.0\InternalModule.psm1 contains 0x00 bytes. It probably uses Unicode/UTF-16 and needs to be converted to UTF-8. Use Fixer 
"Get-UnicodeFilesList $pwd | ConvertTo-UTF8".
Error: [-] Meta.tests.ps1 failed with:
Message
  Expected 0, but got 1.
  at $unicodeFilesCount | Should -Be 0, D:\actions-runner\_work\InternalModule\InternalModule\tests\Meta.tests.ps1:24
  at <ScriptBlock>, D:\actions-runner\_work\InternalModule\InternalModule\tests\Meta.tests.ps1:24

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added this change to the CHANGELOG.md.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

We attempt to append UTF-8 encodings later, but the intial file isn't set to that. This should fix it.

Signed-off-by: Gilbert Sanchez <[email protected]>
@HeyItsGilbert HeyItsGilbert added the bug Something isn't working label Dec 10, 2024
@HeyItsGilbert HeyItsGilbert self-assigned this Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant