diff --git a/RdzeN-Profile.ps1 b/RdzeN-Profile.ps1 index 3fcd5b5..71ac3f7 100644 --- a/RdzeN-Profile.ps1 +++ b/RdzeN-Profile.ps1 @@ -41,6 +41,9 @@ function Pull-Repository { if (-not (Test-Path $path_profile_file)) { Write-Host "Profile file not found locally. Pulling from repository..." -ForegroundColor Yellow Pull-Repository + Get-ChildItem $path_gitea_powershell_profile_functions | ForEach-Object { + . $_.FullName + } # 97. Override profile Override-Profile # 98. Override profile @@ -53,6 +56,9 @@ if (-not (Test-Path $path_profile_file)) { if ($local_profile_hash.Hash -ne $remote_profile_hash.Trim()) { Write-Host "Local profile file has been modified. Pulling from repository..." -ForegroundColor Yellow Pull-Repository + Get-ChildItem $path_gitea_powershell_profile_functions | ForEach-Object { + . $_.FullName + } # 97. Override profile Override-Profile # 98. Override profile @@ -89,16 +95,13 @@ foreach ($function_name in $local_functions_hashes.Keys) { if ($functions_to_pull.Count -gt 0) { Write-Host "Functions have been modified. Pulling from repository..." -ForegroundColor Yellow Pull-Repository + Get-ChildItem $path_gitea_powershell_profile_functions | ForEach-Object { + . $_.FullName + } } else { Write-Host "Functions are up to date." -ForegroundColor Green } - -# 3. Dot source functions. -Get-ChildItem $path_gitea_powershell_profile_functions | ForEach-Object { - . $_.FullName -} - # 4. List functions $functions = Get-ChildItem $path_gitea_powershell_profile_functions | Sort-Object for ($i = 0; $i -lt $functions.Count; $i++) {