Skip to content

Commit a904609

Browse files
authored
fix: (dev) build script for Non-English environment (#1310)
### Questions - [x] Did you test your changes or double-check that they work? - [x] Did you read and follow the [Atlas Contribution Guidelines](https://docs.atlasos.net/contributions/)? ### Describe your pull request fix build script for Non-English environment. I want to test my modified version of playbook, but the output of the test target seems having a broken xml format. It turns out that I use the Chinese environment and powershell use the Chinese encoding to read and write `playbook.conf` file, that would break the `Description` content which contains special characters. So here is the fix, simply add `-Encoding` to the read and write commands.
1 parent 480ea4c commit a904609

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dependencies/local-build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ try {
117117

118118
$tempPbConfPath = Separator "$playbookTemp\playbook.conf"
119119
if ($patterns.Count -gt 0) {
120-
Get-Content "playbook.conf" | Where-Object { $_ -notmatch ($patterns -join '|') } | Set-Content $tempPbConfPath
120+
Get-Content -Encoding "utf8" "playbook.conf" | Where-Object { $_ -notmatch ($patterns -join '|') } | Set-Content -Encoding "utf8" $tempPbConfPath
121121
}
122122

123123
$customYmlPath = Separator "Configuration\custom.yml"

0 commit comments

Comments
 (0)