Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ function Add-ToPath {
# Refresh PowerShell's command discovery to make the command immediately available
# This creates a temporary function with the same name as the executable to force PowerShell to refresh
$exeName = "agentuity"
$tempFunctionName = "global:$exeName"

# Remove any existing function with this name first
if (Get-Command $exeName -ErrorAction SilentlyContinue) {
Expand All @@ -304,8 +303,8 @@ function Add-ToPath {
Remove-Item -Path "Function:\$exeName" -ErrorAction SilentlyContinue
}

# Register the function
Set-Item -Path $tempFunctionName -Value $scriptBlock -Force
# Register the function using the Function: drive instead of global: scope
Set-Item -Path "Function:\$exeName" -Value $scriptBlock -Force

Write-Success "Command '$exeName' is now available in the current PowerShell session"
}
Expand Down
Loading