fix manifest encoding

This commit is contained in:
Rémy
2016-12-11 09:50:09 +01:00
parent 904d0703f9
commit f3d486c1c5
3 changed files with 5 additions and 5 deletions
+1
View File
@@ -17,6 +17,7 @@ if (!$app -and $update) {
. "$psscriptroot\..\lib\config.ps1"
. "$psscriptroot\..\lib\buckets.ps1"
. "$psscriptroot\..\lib\autoupdate.ps1"
. "$psscriptroot\..\lib\json.ps1"
if(!$dir) { $dir = "$psscriptroot\..\bucket" }
$dir = resolve-path $dir
+3 -4
View File
@@ -84,10 +84,9 @@ function autoupdate([String] $app, $json, [String] $version)
Write-Host -f DarkGreen "Writing updated $app manifest"
$path = manifest_path $app
<#
TODO improve json formatting
#>
$json | convertto-json | out-file -filepath $path -encoding utf8
$file_content = $json | ConvertToPrettyJson
[System.IO.File]::WriteAllLines($path, $file_content)
} else {
Write-Host -f DarkGray "No updates for $app"
}
+1 -1
View File
@@ -7,7 +7,7 @@ function manifest_path($app, $bucket) {
function parse_json($path) {
if(!(test-path $path)) { return $null }
gc $path -raw | convertfrom-json -ea stop
gc $path -raw -Encoding UTF8 | convertfrom-json -ea stop
}
function url_manifest($url) {