From 9de0976389cb5d4c874038c2d76dae0ff0c8c501 Mon Sep 17 00:00:00 2001 From: Chawye Hsu Date: Tue, 29 Oct 2024 23:45:06 +0800 Subject: [PATCH] feat: Support using external shim.exe Signed-off-by: Chawye Hsu --- lib/core.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/core.ps1 b/lib/core.ps1 index c271ce8f94..28f90134cc 100644 --- a/lib/core.ps1 +++ b/lib/core.ps1 @@ -1034,7 +1034,8 @@ function shim($path, $global, $name, $arg) { function get_shim_path() { $shim_version = get_config SHIM 'kiennq' - $shim_path = switch ($shim_version) { + $shim_path = switch -Wildcard ($shim_version) { + 'ext:*' { "$(versiondir "$($shim_version -replace 'ext:','')" 'current')\shim.exe" } 'scoopcs' { "$(versiondir 'scoop' 'current')\supporting\shims\scoopcs\shim.exe" } '71' { "$(versiondir 'scoop' 'current')\supporting\shims\71\shim.exe" } 'kiennq' { "$(versiondir 'scoop' 'current')\supporting\shims\kiennq\shim.exe" }