Skip to content

Commit b618553

Browse files
author
Joris
committed
show manifest on installation
1 parent 2bc2e65 commit b618553

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

lib/install.ps1

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ function nightly_version($date, $quiet = $false) {
99
"nightly-$date_str"
1010
}
1111

12+
function Test-ManifestReviewEnabled {
13+
return get_config 'manifest-review' $false
14+
}
15+
1216
function install_app($app, $architecture, $global, $suggested, $use_cache = $true, $check_hash = $true) {
1317
$app, $bucket, $null = parse_app $app
1418
$app, $manifest, $bucket, $url = Find-Manifest $app $bucket
@@ -34,7 +38,18 @@ function install_app($app, $architecture, $global, $suggested, $use_cache = $tru
3438
return
3539
}
3640

37-
write-output "Installing '$app' ($version) [$architecture]"
41+
if (Test-ManifestReviewEnabled) {
42+
$show_manifest = read-host -Prompt "Show manifest? [y/N]"
43+
if ($show_manifest -eq "y") {
44+
write-output "manifest:"
45+
write-output $manifest | ConvertToPrettyJson
46+
$answer = read-host -Prompt "Continue installation? [Y/n]"
47+
48+
if ($answer -eq "n") {
49+
return
50+
}
51+
}
52+
}
3853

3954
$dir = ensure (versiondir $app $version $global)
4055
$original_dir = $dir # keep reference to real (not linked) directory

0 commit comments

Comments
 (0)