Skip to content

Commit

Permalink
fix: fix test case TestAddWithLocalPath
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe committed Sep 19, 2024
1 parent 6300e6d commit d3cd9bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d3cd9bb

Please sign in to comment.