Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ show a shared introduction listing the shell startup files or user environment
variables (HKCU\Environment), then explain each choice in terms of its effect
in future terminals. Show the added paths and current/new JAVA_HOME. Both
questions use `Enable this? [Y/n]`; an empty answer accepts setup, while a
failed read never consents. Both no descriptions say `leave your Java environment
failed read never consents. Both no descriptions say `leave your environment
settings unchanged`. Bash reads `/dev/tty`, never the piped bootstrap stdin.
Without a
usable terminal, or in noninteractive mode, unspecified setup is skipped with
Expand Down
2 changes: 1 addition & 1 deletion tests/tool-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ run --version 0.2.0 --non-interactive --no-path --no-java
ok 'pinned install bypasses latest'
run --path --java --shell bash --non-interactive
[ "$(grep -c 'optional settings below' "$TEMP/err")" = 1 ]
[ "$(grep -c 'No: leave your Java environment settings unchanged.' "$TEMP/err")" = 2 ]
[ "$(grep -c 'No: leave your environment settings unchanged.' "$TEMP/err")" = 2 ]
grep -q 'Run jvm from any directory?' "$TEMP/err"
grep -q "Use jvm's default JDK for Java commands?" "$TEMP/err"
grep -q 'Open a new terminal application' "$TEMP/err"
Expand Down
4 changes: 2 additions & 2 deletions web/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ function Set-UserEnvironment([string]$Destination, [string]$JavaHome, [string]$P
Write-InstallerMessage "`nLet's set up jvm for future terminals.`nThe optional settings below update your user environment variables:`n PATH and JAVA_HOME (HKCU\Environment)"
}
if (-not $toolPresent -and $PathChoice -ne 'no') {
Write-InstallerMessage "`nRun jvm from any directory?`n`nAdds $Destination to your user PATH.`n`nYes: enable the jvm command in future terminals.`nNo: leave your Java environment settings unchanged.`n"
Write-InstallerMessage "`nRun jvm from any directory?`n`nAdds $Destination to your user PATH.`n`nYes: enable the jvm command in future terminals.`nNo: leave your environment settings unchanged.`n"
$toolYes = Get-SetupConsent $PathChoice $Unattended 'Enable this?'
}
if (-not $javaPresent -and $JavaChoice -ne 'no') {
$oldJavaDisplay = '<unset>'
if ($oldJava.Exists) { $oldJavaDisplay = [string]$oldJava.Value }
Write-InstallerMessage "`nUse jvm's default JDK for Java commands?`n`nSets JAVA_HOME to $JavaHome`n(current value: $oldJavaDisplay)`nand adds its bin directory to your user PATH.`n`nYes: configure future terminals to use jvm's default JDK.`nNo: leave your Java environment settings unchanged.`n"
Write-InstallerMessage "`nUse jvm's default JDK for Java commands?`n`nSets JAVA_HOME to $JavaHome`n(current value: $oldJavaDisplay)`nand adds its bin directory to your user PATH.`n`nYes: configure future terminals to use jvm's default JDK.`nNo: leave your environment settings unchanged.`n"
$javaYes = Get-SetupConsent $JavaChoice $Unattended 'Enable this?'
}
if (-not $toolYes -and -not $javaYes) {
Expand Down
2 changes: 1 addition & 1 deletion web/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ setup() {
else
printf '\nRun jvm from any directory?\n\nAdds %s to PATH.\n\nYes: enable the jvm command in future terminals.\n' "$value" >&2
fi
printf 'No: leave your Java environment settings unchanged.\n\n' >&2
printf 'No: leave your environment settings unchanged.\n\n' >&2
if { [ "$kind" = path ] && consent "$pc" 'Enable this?'; } || { [ "$kind" = java ] && consent "$jc" 'Enable this?'; }; then
for file in "${files[@]}"; do edit_profile "$file" "$kind" "$value"; done
SETUP_FILES=() SETUP_BACKUPS=() SETUP_EXISTED=()
Expand Down
Loading