summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Gava Guerra <[email protected]>2022-04-02 07:07:48 -0300
committerGitHub <[email protected]>2022-04-02 12:07:48 +0200
commit84e499aa38f661be5ea54a6bf7b0cbbf987ec9ff (patch)
tree07e227357957ab6ed839333734cf9a5c02c225a7
parent7807f147c192fdb6aec7659a3098b4bf31852fcd (diff)
fix(installer/pwsh): fixes some details on installer and uninstaller (#2404)
-rw-r--r--utils/installer/install.ps12
-rw-r--r--utils/installer/uninstall.ps110
2 files changed, 9 insertions, 3 deletions
diff --git a/utils/installer/install.ps1 b/utils/installer/install.ps1
index bef15ac2..182e7bac 100644
--- a/utils/installer/install.ps1
+++ b/utils/installer/install.ps1
@@ -267,7 +267,7 @@ function create_alias {
return
}
- Add-Content -Path $PROFILE -Value $("Set-Alias lvim $lvim_bin")
+ Add-Content -Path $PROFILE -Value $("`r`nSet-Alias lvim $lvim_bin")
Write-Host 'To use the new alias in this window reload your profile with: `. $PROFILE`' -ForegroundColor Green
}
diff --git a/utils/installer/uninstall.ps1 b/utils/installer/uninstall.ps1
index 4d6ffa5d..2de21037 100644
--- a/utils/installer/uninstall.ps1
+++ b/utils/installer/uninstall.ps1
@@ -49,9 +49,15 @@ function remove_lvim_dirs($force) {
if (Test-Path $dir) {
Remove-Item -Force -Recurse $dir
}
- if ($force -eq $true -and (Test-Path "$dir.bak" -or Test-Path "$dir.old")) {
- Remove-Item -Force -Recurse "$dir.{bak,old}"
+ if ($force -eq $true) {
+ if (Test-Path "$dir.bak") {
+ Remove-Item -Force -Recurse "$dir.bak"
+ }
+ if (Test-Path "$dir.old") {
+ Remove-Item -Force -Recurse "$dir.old"
+ }
}
}
}
+main($args) \ No newline at end of file