From 17ce03792c2785fc404268817f5ddfc106f11a89 Mon Sep 17 00:00:00 2001 From: schristoff <28318173+schristoff@users.noreply.github.com> Date: Tue, 24 Sep 2024 09:34:02 -0600 Subject: [PATCH] remove identifyAndFallbackToClusterSource Signed-off-by: schristoff <28318173+schristoff@users.noreply.github.com> --- src/cmd/package.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/cmd/package.go b/src/cmd/package.go index bd5a6f352c..3ae1b0e2ff 100644 --- a/src/cmd/package.go +++ b/src/cmd/package.go @@ -30,7 +30,6 @@ import ( "github.com/zarf-dev/zarf/src/pkg/message" "github.com/zarf-dev/zarf/src/pkg/packager" "github.com/zarf-dev/zarf/src/pkg/packager/filters" - "github.com/zarf-dev/zarf/src/pkg/packager/sources" "github.com/zarf-dev/zarf/src/pkg/utils" "github.com/zarf-dev/zarf/src/types" ) @@ -399,22 +398,6 @@ func choosePackage(args []string) (string, error) { return path, nil } -// NOTE: If the source is identified nil is returned because packager will create the source if it is nil. -// If it can't be identified the cluster source is used causing packager to ignore the configured package source. -// Use of cluster package source is limited to a few functions which is why this is not the default behavior. -func identifyAndFallbackToClusterSource() (sources.PackageSource, error) { - identifiedSrc := sources.Identify(pkgConfig.PkgOpts.PackageSource) - if identifiedSrc == "" { - message.Debugf(lang.CmdPackageClusterSourceFallback, pkgConfig.PkgOpts.PackageSource) - src, err := sources.NewClusterSource(&pkgConfig.PkgOpts) - if err != nil { - return nil, fmt.Errorf("unable to identify source from %s: %w", pkgConfig.PkgOpts.PackageSource, err) - } - return src, nil - } - return nil, nil -} - func getPackageCompletionArgs(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) { var pkgCandidates []string