Skip to content

Commit 8106378

Browse files
OlyOly
authored andcommitted
fix formatting on install-win.ps1
1 parent 2681e33 commit 8106378

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

script/install-win.ps1

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ $binPath = "$env:USERPROFILE\.local\bin"
33
$exePath = Join-Path $binPath "kt-encabulator.exe"
44

55
if (Test-Path -Path $exePath) {
6-
Write-Host "`n> Found existing binary in local bin. Do you wish to Continue? `e[1;34m(y/n)`e[0m"
6+
Write-Host -NoNewline "`n> Found existing binary in local bin. Do you wish to Continue? "
7+
Write-Host "(y/n)" -ForegroundColor Blue
8+
79
$choice = Read-Host
810
if ($choice -match '^[yY]$') {
911
Remove-Item -Path $exePath -Force
10-
} else {
11-
Write-Host "The existing file will not be overwritten. `e[1;34mExiting...`e[0m" -ForegroundColor Blue
12+
}
13+
14+
else {
15+
Write-Host "The existing file will not be overwritten. Exiting..." -ForegroundColor Blue
1216
exit
1317
}
1418
}
@@ -20,7 +24,10 @@ if (-Not (Test-Path -Path $binPath)) {
2024
Write-Host "`n> Downloading binary with Invoke-WebRequest..."
2125
Invoke-WebRequest -Uri "https://github.com/Olypolyu/Kotlin-Encabulator/releases/download/$latest/kt-encabulator.exe" -OutFile $exePath
2226

23-
Write-Host "`n`e[1;32mReady to go!`e[0m Execute with `"`e[1;34mkt-encabulator.exe`e[0m`""
27+
Write-Host -NoNewline "`nReady to go! " -ForegroundColor Green
28+
Write-Host -NoNewline "Execute with "
29+
Write-Host "`"kt-encabulator.exe`"" -ForegroundColor Blue
30+
31+
Write-Host " - Add $binPath to your PATH to run from anywhere"
2432
Write-Host " - Run with -h or --help for documentation."
25-
Write-Host " - Add "$binPath" to your PATH to run from anywhere"
26-
Write-Host " "
33+
Write-Host " "

0 commit comments

Comments
 (0)