Skip to content

Commit

Permalink
feat: export WebRootEnv
Browse files Browse the repository at this point in the history
We need to access the webroot env variable in our confgen buildpack, not
just the `WebRoot` function.
  • Loading branch information
ctrox committed Apr 23, 2024
1 parent 8bb0706 commit 6cd4ec6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

const (
indexFile = "index.html"
webRootEnv = "BP_STATIC_WEBROOT"
WebRootEnv = "BP_STATIC_WEBROOT"
)

type BuildPlanMetadata struct {
Expand Down Expand Up @@ -44,7 +44,7 @@ func Detect(logger scribe.Emitter) packit.DetectFunc {

func WebRoot(workingDir string) (string, error) {
// the webroot can be set using an env var
if v, ok := os.LookupEnv(webRootEnv); ok {
if v, ok := os.LookupEnv(WebRootEnv); ok {
return v, nil
}

Expand Down

0 comments on commit 6cd4ec6

Please sign in to comment.