From ca20f5bb0a18645e9057411cbd40663ca29524a1 Mon Sep 17 00:00:00 2001 From: MrJack <36191829+biagiopietro@users.noreply.github.com> Date: Mon, 19 Jan 2026 15:32:54 +0100 Subject: [PATCH] Applied feedback from review pt. 2 Signed-off-by: MrJack <36191829+biagiopietro@users.noreply.github.com> --- internal/plugin/installer/installer.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/plugin/installer/installer.go b/internal/plugin/installer/installer.go index 568a0488d..6633a61e8 100644 --- a/internal/plugin/installer/installer.go +++ b/internal/plugin/installer/installer.go @@ -157,8 +157,13 @@ func NewForSource(source, version string) (installer Installer, err error) { } // FindSource determines the correct Installer for the given source. -func FindSource(location string, version string) (Installer, error) { - installer, err := existingVCSRepo(location, version) +// Version is optional; if not provided, it defaults to empty string. +func FindSource(location string, version ...string) (Installer, error) { + v := "" + if len(version) > 0 { + v = version[0] + } + installer, err := existingVCSRepo(location, v) if err != nil && err.Error() == "Cannot detect VCS" { slog.Warn( "cannot get information about plugin source",