From 997b738cd6b2c7b4a506f4ea0b2b54b1f04fa7f1 Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 30 May 2024 04:09:52 +0200 Subject: Testing --- .config/powershell/bootstrap.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.config') diff --git a/.config/powershell/bootstrap.ps1 b/.config/powershell/bootstrap.ps1 index b8e0a21..1438442 100644 --- a/.config/powershell/bootstrap.ps1 +++ b/.config/powershell/bootstrap.ps1 @@ -268,7 +268,7 @@ rm OneDrive -r -force Write-Host "Configuring PowerShell" Write-Host "----------------------------------------" -$UserMyDocumentsPath = [Environment]::GetFolderPath('MyDocuments') +$UserMyDocumentsPath = [System.Environment]::GetFolderPath('MyDocuments').Replace("OneDrive", "") $PowerShellProfileDirectory = "$UserMyDocumentsPath\PowerShell" $PowerShellLegacySymlink = "$UserMyDocumentsPath\WindowsPowerShell" @@ -276,10 +276,11 @@ $PowerShellProfileTemplate = "$PSScriptRoot\$USERNAME\Documents\PowerShell\Micro $env:PSModulePath = $env:PSModulePath -replace "\\OneDrive\\Documents\\WindowsPowerShell\\","\.powershell\" # Set documents path to user's local Documents folder -$documentsPath = "$env:USERPROFILE\Documents" +$documentsPath = "$UserMyDocumentsPath" $powerShellProfileDir = "$documentsPath\PowerShell" # Output the chosen PowerShell profile directory +$PROFILE = "$powerShellProfileDir\Microsoft.PowerShell_profile.ps1" Write-Host "PowerShell profile directory set to: $powerShellProfileDir" if (-not (Test-Path -Path $powerShellProfileDir)) { -- cgit v1.2.3