mirror of
https://github.com/mudler/luet.git
synced 2025-08-31 14:52:02 +00:00
Fix path deletion on artifacts
This commit is contained in:
@@ -36,10 +36,10 @@ import (
|
||||
type ArtifactIndex []Artifact
|
||||
|
||||
func (i ArtifactIndex) CleanPath() ArtifactIndex {
|
||||
var newIndex []Artifact
|
||||
copy(newIndex, i)
|
||||
for _, n := range newIndex {
|
||||
n.SetPath(path.Base(n.GetPath()))
|
||||
newIndex := ArtifactIndex{}
|
||||
for _, n := range i {
|
||||
art := n.(*PackageArtifact)
|
||||
newIndex = append(newIndex, &PackageArtifact{Path: path.Base(n.GetPath()), SourceAssertion: art.SourceAssertion, CompileSpec: art.CompileSpec, Dependencies: art.Dependencies})
|
||||
}
|
||||
return newIndex
|
||||
//Update if exists, otherwise just create
|
||||
|
Reference in New Issue
Block a user