From 8062d209725ce24f75aa9c5f43029fc21a83f13c Mon Sep 17 00:00:00 2001 From: Brian <18603393+brian6932@users.noreply.github.com> Date: Thu, 10 Apr 2025 06:01:25 -0400 Subject: [PATCH] powershell: Ignore errors from `__zoxide_hooked` --- templates/powershell.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/powershell.txt b/templates/powershell.txt index 86b1966..7744338 100644 --- a/templates/powershell.txt +++ b/templates/powershell.txt @@ -80,7 +80,7 @@ function global:__zoxide_hook { {%- endif %} # Initialize hook. -$global:__zoxide_hooked = (Get-Variable __zoxide_hooked -ErrorAction SilentlyContinue -ValueOnly) +$global:__zoxide_hooked = (Get-Variable __zoxide_hooked -ErrorAction Ignore -ValueOnly) if ($global:__zoxide_hooked -ne 1) { $global:__zoxide_hooked = 1 $global:__zoxide_prompt_old = $function:prompt