diff options
author | Philipp Bokatius <[email protected]> | 2022-08-09 13:54:25 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-08-09 13:54:25 +0200 |
commit | 7fc0d0f72b9fbe7bc94cc2a9a30dd9c22b9d8ce9 (patch) | |
tree | 939fb054fd5a92eec2571a0d5f92fa51b50ce049 /utils | |
parent | 3bc52f9988a58e3e1a2a48ee2299383d967a1573 (diff) |
fix(installer): create profile.ps1 if nonexistent (#2810)
Diffstat (limited to 'utils')
-rw-r--r-- | utils/installer/install.ps1 | 7 |
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 |