From ac4dd5a9ec6a5138887004439c5dd73a39e5b3b5 Mon Sep 17 00:00:00 2001 From: dann frazier Date: Fri, 3 Jan 2025 11:36:23 -0700 Subject: [PATCH] Use DefaultWorkspaceDir from container instead of hardcoding "/home/build" Signed-off-by: dann frazier --- pkg/config/config.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index b0f4287c0..643e83b53 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -39,6 +39,7 @@ import ( "github.com/joho/godotenv" "gopkg.in/yaml.v3" + "chainguard.dev/melange/pkg/container" "chainguard.dev/melange/pkg/util" ) @@ -1378,8 +1379,8 @@ func ParseConfiguration(_ context.Context, configurationFilePath string, opts .. } const ( - defaultEnvVarHOME = "/home/build" - defaultEnvVarGOPATH = "/home/build/.cache/go" + defaultEnvVarHOME = container.DefaultWorkspaceDir + defaultEnvVarGOPATH = container.DefaultWorkspaceDir + "/.cache/go" defaultEnvVarGOMODCACHE = "/var/cache/melange/gomodcache" )