Skip to content

Commit 4c761a4

Browse files
Frankie Gallina-Jonesryanmoran
authored andcommitted
suggested change from code review
1 parent 5e4ede5 commit 4c761a4

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

build.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,7 @@ func Build(projectPathParser PathParser,
6363
if len(bindings) == 1 {
6464
logger.Process("Loading npmrc service binding")
6565

66-
npmrcExists := false
67-
for key := range bindings[0].Entries {
68-
if key == ".npmrc" {
69-
npmrcExists = true
70-
break
71-
}
72-
}
73-
if !npmrcExists {
66+
if _, ok := bindings[0].Entries[".npmrc"]; !ok {
7467
return packit.BuildResult{}, errors.New("binding of type 'npmrc' does not contain required entry '.npmrc'")
7568
}
7669
globalNpmrcPath = filepath.Join(bindings[0].Path, ".npmrc")

0 commit comments

Comments
 (0)