From 12023c1a772fa6496fd73bf104d71d3747e0e5f2 Mon Sep 17 00:00:00 2001 From: Costas Papastathis Date: Fri, 13 Sep 2024 10:40:53 +0300 Subject: [PATCH] fix: importing default values from extension --- internal/utils/utils.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 99f4d63..431f51c 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -13,14 +13,12 @@ import ( "strings" "text/template" + ubinodejsextension "github.com/paketo-community/ubi-nodejs-extension" "github.com/paketo-community/ubi-nodejs-extension/structs" "github.com/BurntSushi/toml" ) -var DEFAULT_USER_ID = 1002 -var DEFAULT_GROUP_ID = 1000 - //go:embed templates/build.Dockerfile var buildDockerfileTemplate string @@ -158,8 +156,8 @@ func ParseImagesJsonFile(imagesJsonPath string) (ImagesJson, error) { func GetDuringBuildPermissions(filepath string) structs.DuringBuildPermissions { defaultPermissions := structs.DuringBuildPermissions{ - CNB_USER_ID: DEFAULT_USER_ID, - CNB_GROUP_ID: DEFAULT_GROUP_ID, + CNB_USER_ID: ubinodejsextension.DEFAULT_USER_ID, + CNB_GROUP_ID: ubinodejsextension.DEFAULT_GROUP_ID, } re := regexp.MustCompile(`cnb:x:(\d+):(\d+)::`)