Commit 80605db
authored
Build-PSBuildModule Compile UTF-8 File (#71)
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:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [X] My code follows the code style of this project.
- [X] I have updated the documentation accordingly.
- [X] I have added this change to the CHANGELOG.md.
- [X] I have read the **CONTRIBUTING** document.
- [X] I have added tests to cover my changes.
- [X] All new and existing tests passed.
---------
Signed-off-by: Gilbert Sanchez <me@gilbertsanchez.com>1 parent 5554b43 commit 80605db
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
0 commit comments