From 3e8888517d219a77153dff0325a5ddcfcdaff041 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 26 Jun 2023 15:16:42 +0100 Subject: [PATCH] Read a local.ps1 file --- roles/home-cli/files/Microsoft.PowerShell_profile.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 b/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 index 7d9225c..9423f39 100644 --- a/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 +++ b/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 @@ -110,3 +110,9 @@ if ($PSVersionTable.PSVersion -ge [System.Version]"7.2.0.0") { Variable = $AnsiReset; } } + +# Keep this at the end. +$LocalProfilePath = Join-Path -Path "$PSScriptRoot" -ChildPath "local.ps1" +if (Test-Path $LocalProfilePath -PathType Leaf) { + . $LocalProfilePath +}