mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-09-22 21:35:56 +00:00
fix manifest encoding
This commit is contained in:
@@ -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
@@ -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
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user