diff options
Diffstat (limited to '.config/powershell')
| -rw-r--r-- | .config/powershell/bootstrap.ps1 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/.config/powershell/bootstrap.ps1 b/.config/powershell/bootstrap.ps1 index cf8f9a5..c655986 100644 --- a/.config/powershell/bootstrap.ps1 +++ b/.config/powershell/bootstrap.ps1 @@ -294,16 +294,16 @@ New-Item -ItemType HardLink -Force ` -Path "$powerShellProfileDir\Microsoft.PowerShell_profile.ps1" ` -Target "$home\.config\powershell\Microsoft.PowerShell_profile.ps1" -## Set environment variable -#[System.Environment]::SetEnvironmentVariable('PowerShellProfileDir', $powerShellProfileDir, [System.EnvironmentVariableTarget]::User) -# -#Write-Host "PowerShell profile directory set to: $powerShellProfileDir" -#Write-Host "Environment variable 'PowerShellProfileDir' set to: $powerShellProfileDir" +# Set environment variable +[System.Environment]::SetEnvironmentVariable('PowerShellProfileDir', $powerShellProfileDir, [System.EnvironmentVariableTarget]::User) -## Verify profile sourcing -#if (!(Test-Path -Path "$home\.config\powershell\Microsoft.PowerShell_profile.ps1")) { -# handle_error "PowerShell profile does not exist. Please create it at $home\.config\powershell\Microsoft.PowerShell_profile.ps1" -#} +Write-Host "PowerShell profile directory set to: $powerShellProfileDir" +Write-Host "Environment variable 'PowerShellProfileDir' set to: $powerShellProfileDir" + +# Verify profile sourcing +if (!(Test-Path -Path "$home\.config\powershell\Microsoft.PowerShell_profile.ps1")) { + handle_error "PowerShell profile does not exist. Please create it at $home\.config\powershell\Microsoft.PowerShell_profile.ps1" +} # Define the `config` alias in the current session function global:config { |
