Move repository helpers under config

They are generated after the system config, let the structure provide such information
This commit is contained in:
Ettore Di Giacinto
2020-02-12 10:20:07 +01:00
parent 4f33eca263
commit dfb6dab9dc
12 changed files with 59 additions and 75 deletions

View File

@@ -22,6 +22,7 @@ import (
"path/filepath"
. "github.com/mudler/luet/pkg/logger"
"github.com/mudler/luet/pkg/config"
"github.com/mudler/luet/pkg/compiler"
"github.com/mudler/luet/pkg/helpers"
@@ -39,7 +40,7 @@ func (c *LocalClient) DownloadArtifact(artifact compiler.Artifact) (compiler.Art
var err error
artifactName := path.Base(artifact.GetPath())
cacheFile := filepath.Join(helpers.GetSystemPkgsCacheDirPath(), artifactName)
cacheFile := filepath.Join(config.LuetCfg.GetSystem().GetSystemPkgsCacheDirPath(), artifactName)
// Check if file is already in cache
if helpers.Exists(cacheFile) {