From 94028eff12f5500cc56e744b3e818965031cc723 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Mon, 25 Nov 2024 15:10:09 +0100 Subject: [PATCH] bugfix: create powershell profile directory if not exists --- install_windows.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install_windows.ps1 b/install_windows.ps1 index b35ac3e..f5fd009 100644 --- a/install_windows.ps1 +++ b/install_windows.ps1 @@ -46,6 +46,12 @@ if ($null -eq $ubuntu) # Setting up PowerShell Profile Write-Host "Setting up PowerShell profile..." -ForegroundColor Cyan +# Create local PowerShell profile directory +$psDir = Split-Path -Path $psProfile +if (-not (Test-Path $psDir)) +{ New-Item -ItemType Directory -Path $psDir +} +# Copy existing startup script to destination CopyFileWithPrompt "$dotfilesRepo\PowerShell\Microsoft.PowerShell_profile.ps1" $psProfile # Setting up self-made ProxySwitcher