Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Fixed BOM (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
majkinetor committed Oct 19, 2016
1 parent be471c9 commit 83732ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
8 changes: 4 additions & 4 deletions AU/Public/Update-Package.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Author: Miodrag Milic <miodrag.milic@gmail.com>
# Last Change: 15-Oct-2016.
# Last Change: 19-Oct-2016.

<#
.SYNOPSIS
Expand Down Expand Up @@ -109,7 +109,6 @@ function Update-Package {
$response = request $url $Timeout
if ($response.ContentType -like '*text/html*') { $err="Latest $($package.Name) URL content type is text/html" }
else {
$res = $true
" $url" | result
}
}
Expand Down Expand Up @@ -252,14 +251,15 @@ function Update-Package {
$fileName = $_
" $fileName" | result

$fileContent = gc $fileName
$fileContent = gc $fileName -Encoding UTF8
$sr[ $fileName ].GetEnumerator() | % {
(' {0} = {1} ' -f $_.name, $_.value) | result
if (!($fileContent -match $_.name)) { throw "Search pattern not found: '$($_.name)'" }
$fileContent = $fileContent -replace $_.name, $_.value
}

$fileContent | Out-File -Encoding UTF8 $fileName
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($False)
[System.IO.File]::WriteAllLines((Resolve-Path $fileName), $fileContent, $Utf8NoBomEncoding)
}
}

Expand Down
12 changes: 5 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
- `Update-Package`
- Show 'URL check in output'.
- Fixed URL check timeout [#35](https://github.com/majkinetor/au/issues/35).
- `Update-AUPackages`
- Small fixes

### Bugfixes

- AU updated nuspec file to UTF-8 with BOM [#39](https://github.com/majkinetor/au/issues/39).
- Small fixes.

## 2016.10.9

Expand Down Expand Up @@ -132,8 +135,3 @@ Take a look at the [working example](https://github.com/majkinetor/au-packages/b
- Automatic checksum.
- Raise errors on search pattern not found.
- Bugfixes and small improvements.





0 comments on commit 83732ca

Please sign in to comment.