diff --git a/SPEC.md b/SPEC.md index 5dfa8b6..4f73c44 100644 --- a/SPEC.md +++ b/SPEC.md @@ -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 diff --git a/tests/tool-installer.sh b/tests/tool-installer.sh index f57eeaf..d469e56 100644 --- a/tests/tool-installer.sh +++ b/tests/tool-installer.sh @@ -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" diff --git a/web/install.ps1 b/web/install.ps1 index 4835b10..529348f 100644 --- a/web/install.ps1 +++ b/web/install.ps1 @@ -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 = '' 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) { diff --git a/web/install.sh b/web/install.sh index 6080b42..a66a50e 100644 --- a/web/install.sh +++ b/web/install.sh @@ -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=()