From d3cd9bbf550dcf82f529243cbfd1a36dd2ee883e Mon Sep 17 00:00:00 2001 From: zongz Date: Thu, 19 Sep 2024 19:16:17 +0800 Subject: [PATCH] fix: fix test case TestAddWithLocalPath Signed-off-by: zongz --- pkg/loader/loader.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/loader/loader.go b/pkg/loader/loader.go index f863c914..65026dd6 100644 --- a/pkg/loader/loader.go +++ b/pkg/loader/loader.go @@ -47,7 +47,6 @@ func preProcess(kpkg *pkg.KclPkg, settings *settings.Settings) error { } } dep.LocalFullPath = localFullPath - kpkg.ModFile.Dependencies.Deps.Set(name, dep) } // Fill the default oci registry. if dep.Source.Oci != nil { @@ -86,6 +85,7 @@ func preProcess(kpkg *pkg.KclPkg, settings *settings.Settings) error { kpkg.ModFile.Dependencies.Deps.Set(name, dep) if lockDep, ok := kpkg.Dependencies.Deps.Get(name); ok { lockDep.Source = dep.Source + lockDep.LocalFullPath = dep.LocalFullPath kpkg.Dependencies.Deps.Set(name, lockDep) } } @@ -118,7 +118,6 @@ func WithSettings(settings *settings.Settings) Option { // Load loads a package from the file system. func Load(options ...Option) (*pkg.KclPkg, error) { - opts := &LoadOptions{} for _, opt := range options { opt(opts)