From 7fc0d0f72b9fbe7bc94cc2a9a30dd9c22b9d8ce9 Mon Sep 17 00:00:00 2001 From: Philipp Bokatius Date: Tue, 9 Aug 2022 13:54:25 +0200 Subject: fix(installer): create profile.ps1 if nonexistent (#2810) --- utils/installer/install.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3