summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPhilipp Bokatius <[email protected]>2022-08-09 13:54:25 +0200
committerGitHub <[email protected]>2022-08-09 13:54:25 +0200
commit7fc0d0f72b9fbe7bc94cc2a9a30dd9c22b9d8ce9 (patch)
tree939fb054fd5a92eec2571a0d5f92fa51b50ce049 /utils
parent3bc52f9988a58e3e1a2a48ee2299383d967a1573 (diff)
fix(installer): create profile.ps1 if nonexistent (#2810)
Diffstat (limited to 'utils')
-rw-r--r--utils/installer/install.ps17
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/installer/install.ps1 b/utils/installer/install.ps1
index dcfa47f4..320e377c 100644
--- a/utils/installer/install.ps1
+++ b/utils/installer/install.ps1
@@ -264,6 +264,13 @@ function create_alias {
return
}
+ try {
+ Get-Content $PROFILE -ErrorAction Stop
+ }
+ catch {
+ New-Item -Path $PROFILE -ItemType "file" -Force
+ }
+
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