Skip to content

Commit

Permalink
suggested change from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Frankie Gallina-Jones authored and ryanmoran committed Jan 20, 2022
1 parent 5e4ede5 commit 4c761a4
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,7 @@ func Build(projectPathParser PathParser,
if len(bindings) == 1 {
logger.Process("Loading npmrc service binding")

npmrcExists := false
for key := range bindings[0].Entries {
if key == ".npmrc" {
npmrcExists = true
break
}
}
if !npmrcExists {
if _, ok := bindings[0].Entries[".npmrc"]; !ok {
return packit.BuildResult{}, errors.New("binding of type 'npmrc' does not contain required entry '.npmrc'")
}
globalNpmrcPath = filepath.Join(bindings[0].Path, ".npmrc")
Expand Down

0 comments on commit 4c761a4

Please sign in to comment.