From ee055e08b147d5ea246d25a7b532fae3efae71c1 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sun, 5 Jan 2020 15:51:48 +0100 Subject: [PATCH] Set abs path when returning artifact from yaml --- pkg/compiler/artifact.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/compiler/artifact.go b/pkg/compiler/artifact.go index 7ce08ef1..44ac8f2c 100644 --- a/pkg/compiler/artifact.go +++ b/pkg/compiler/artifact.go @@ -99,8 +99,13 @@ func LoadArtifactFromYaml(spec CompilationSpec) (Artifact, error) { if err != nil { return nil, errors.Wrap(err, "Error reading file "+metaFile) } - - return NewPackageArtifactFromYaml(dat) + art, err := NewPackageArtifactFromYaml(dat) + if err != nil { + return nil, errors.Wrap(err, "Error writing file "+metaFile) + } + // It is relative, set it back to abs + art.SetPath(spec.Rel(art.GetPath())) + return art, nil } func (a *PackageArtifact) SetCompressionType(t CompressionImplementation) {